]> git.saurik.com Git - uikittools.git/blob - makefile
Simplify the build environment (for shared flags).
[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 flags := -Os -Werror
13 flags += -framework CoreFoundation
14 flags += -framework Foundation
15
16 gssc := -lobjc
17 iomfsetgamma := -I. $(private) -framework IOKit -framework IOMobileFramebuffer
18 sbdidlaunch := $(private) -framework SpringBoardServices
19 uicache := -framework UIKit # XXX: UIKit -> MobileCoreServices
20 uiduid := --framework UIKit
21 uiopen := --framework UIKit
22 uishoot := -framework UIKit
23
24 uicache: csstore.cpp
25 extrainst_: csstore.cpp
26
27 %.dylib: %.mm
28 cycc -i2.0 -o$@ -- -dynamiclib $(flags) $^ $($@) -lobjc
29 ldid -S $@
30
31 %: %.mm
32 cycc -i2.0 -o$@ -- $^ $(flags) $($@)
33 ldid -S$(wildcard $@.xml) $@
34
35 %: %.c
36 cycc -i2.0 -o$@ -- -x c $^ $(flags) $($@)
37 ldid -S$(wildcard $@.xml) $@
38
39 package: all extrainst_
40 sudo rm -rf _
41 mkdir -p _/usr/lib
42 cp -a $(filter %.dylib,$(uikittools)) _/usr/lib
43 mkdir -p _/usr/bin
44 cp -a $(filter-out %.dylib,$(uikittools)) _/usr/bin
45 mkdir -p _/DEBIAN
46 ./control.sh _ >_/DEBIAN/control
47 cp -a extrainst_ _/DEBIAN/
48 mkdir -p debs
49 ln -sf debs/uikittools_$$(./version.sh)_iphoneos-arm.deb uikittools.deb
50 sudo chown -R 0 _
51 sudo chgrp -R 0 _
52 dpkg-deb -b _ uikittools.deb
53 readlink uikittools.deb