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