]> git.saurik.com Git - uikittools.git/blob - makefile
Apple's newer LLVM backends generate garbage code.
[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
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 %: %.mm
28 sudo xcode-select --switch /Applications/Xcode-4.6.3.app
29 cycc -i2.0 -o$@ -- $^ $(flags) $($@)
30 ldid -S$(wildcard $@.xml) $@
31
32 %: %.c
33 sudo xcode-select --switch /Applications/Xcode-4.6.3.app
34 cycc -i2.0 -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