]> git.saurik.com Git - uikittools.git/blame - makefile
Avoid default cycc behavior of compiling to arm64.
[uikittools.git] / makefile
CommitLineData
77214e8e 1uikittools = uiduid uicache uiopen gssc sbdidlaunch sbreload cfversion iomfsetgamma
2a72f832
JF
2
3all: $(uikittools)
4
5clean:
e0d6a30e 6 rm -f $(uikittools) extrainst_
2a72f832
JF
7
8.PHONY: all clean package
a60b86de 9
a830525c
JF
10private := -F/System/Library/PrivateFrameworks
11
54798aa7
JF
12flags := -Os -Werror
13flags += -framework CoreFoundation
14flags += -framework Foundation
61bc7627
JF
15flags += -miphoneos-version-min=2.0
16flags += -arch armv6
54798aa7
JF
17
18gssc := -lobjc
a830525c 19iomfsetgamma := -I. $(private) -framework IOKit -framework IOMobileFramebuffer
54798aa7
JF
20sbdidlaunch := $(private) -framework SpringBoardServices
21uicache := -framework UIKit # XXX: UIKit -> MobileCoreServices
85a77f07
JF
22uiduid := -framework UIKit
23uiopen := -framework UIKit
54798aa7 24uishoot := -framework UIKit
7141b425 25
4ab9b1c7 26uicache: csstore.cpp
ee2ee18b 27extrainst_: csstore.cpp
4ab9b1c7 28
a60b86de 29%: %.mm
61bc7627 30 cycc -- -o $@ $^ $(flags) $($@)
43318ffe 31 ldid -S$(wildcard $@.xml) $@
2a72f832 32
2618b3e9 33%: %.c
61bc7627 34 cycc -- -o $@ -x c $^ $(flags) $($@)
43318ffe 35 ldid -S$(wildcard $@.xml) $@
d9e253f6 36
ee2ee18b 37package: all extrainst_
a830525c 38 sudo rm -rf _
57ebf0d9 39 mkdir -p _/usr/bin
10fd0e0c 40 cp -a $(filter-out %.dylib,$(uikittools)) _/usr/bin
57ebf0d9
JF
41 mkdir -p _/DEBIAN
42 ./control.sh _ >_/DEBIAN/control
ee2ee18b 43 cp -a extrainst_ _/DEBIAN/
57ebf0d9
JF
44 mkdir -p debs
45 ln -sf debs/uikittools_$$(./version.sh)_iphoneos-arm.deb uikittools.deb
a830525c
JF
46 sudo chown -R 0 _
47 sudo chgrp -R 0 _
57ebf0d9
JF
48 dpkg-deb -b _ uikittools.deb
49 readlink uikittools.deb