]> git.saurik.com Git - uikittools.git/blob - makefile
Port build to cycc (from Telesphoreo/iPhone-API).
[uikittools.git] / makefile
1 uikittools = uiduid uicache uiopen gssc sbdidlaunch sbreload cfversion iomfsetgamma libuicache.dylib
2
3 all: $(uikittools)
4
5 clean:
6 rm -f $(uikittools) extrainst_
7
8 .PHONY: all clean package
9
10 private := -F/System/Library/PrivateFrameworks
11
12 cfversion := -framework CoreFoundation
13 gssc := -lobjc -framework CoreFoundation
14 iomfsetgamma := -I. $(private) -framework IOKit -framework IOMobileFramebuffer
15 sbdidlaunch := $(private) -framework CoreFoundation -framework SpringBoardServices
16 sbreload := -framework CoreFoundation
17 uicache := -framework Foundation -framework UIKit # XXX: UIKit -> MobileCoreServices
18 uiduid := -framework Foundation -framework UIKit
19 uiopen := -framework Foundation -framework UIKit
20 uishoot := -framework CoreFoundation -framework Foundation -framework UIKit
21 extrainst_ := -framework CoreFoundation -framework Foundation
22
23 uicache: csstore.cpp
24 extrainst_: csstore.cpp
25
26 %.dylib: %.mm
27 cycc -i2.0 -o$@ -- -dynamiclib -Werror $^ $($@) -lobjc
28 ldid -S $@
29
30 %: %.mm
31 cycc -i2.0 -o$@ -- -Werror $^ $($@)
32 ldid -S$(wildcard $@.xml) $@
33
34 %: %.c
35 cycc -i2.0 -o$@ -- -Werror -x c $^ $($@)
36 ldid -S$(wildcard $@.xml) $@
37
38 package: all extrainst_
39 sudo rm -rf _
40 mkdir -p _/usr/lib
41 cp -a $(filter %.dylib,$(uikittools)) _/usr/lib
42 mkdir -p _/usr/bin
43 cp -a $(filter-out %.dylib,$(uikittools)) _/usr/bin
44 mkdir -p _/DEBIAN
45 ./control.sh _ >_/DEBIAN/control
46 cp -a extrainst_ _/DEBIAN/
47 mkdir -p debs
48 ln -sf debs/uikittools_$$(./version.sh)_iphoneos-arm.deb uikittools.deb
49 sudo chown -R 0 _
50 sudo chgrp -R 0 _
51 dpkg-deb -b _ uikittools.deb
52 readlink uikittools.deb