]>
Commit | Line | Data |
---|---|---|
1e4922b8 JF |
1 | ios := 3.2 |
2 | ||
3 | flags := | |
4 | link := | |
5 | ||
6 | #dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma | |
7 | dpkg := dpkg-deb | |
8 | ||
ad8c38ed JF |
9 | sdk := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(ios).sdk |
10 | ||
11 | flags += -F$(sdk)/System/Library/PrivateFrameworks | |
1e4922b8 JF |
12 | flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib |
13 | flags += -Wall -Werror -Wno-deprecated-declarations | |
14 | flags += -fmessage-length=0 | |
15 | flags += -g0 -O2 | |
16 | flags += -fobjc-call-cxx-cdtors -fobjc-exceptions | |
17 | ||
18 | link += -framework CoreFoundation | |
19 | link += -framework CoreGraphics | |
20 | link += -framework Foundation | |
21 | link += -framework GraphicsServices | |
22 | link += -framework IOKit | |
23 | link += -framework JavaScriptCore | |
24 | link += -framework QuartzCore | |
25 | link += -framework SystemConfiguration | |
26 | link += -framework UIKit | |
27 | link += -framework WebCore | |
28 | link += -framework WebKit | |
29 | ||
30 | link += -lapr-1 | |
31 | link += -lapt-pkg | |
32 | link += -lpcre | |
33 | ||
34 | link += -multiply_defined suppress | |
b0d03ade | 35 | |
ad8c38ed JF |
36 | #cycc = cycc -r4.2 -i$(ios) -o$@ |
37 | gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ | |
38 | cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=$(ios) -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks | |
39 | ||
2bfeaf6f | 40 | all: Cydia |
a75f53e7 | 41 | |
b0d03ade | 42 | clean: |
2bfeaf6f | 43 | rm -f Cydia |
b0d03ade | 44 | |
8675cad4 | 45 | Cydia: Cydia.mm Reachability.mm UICaboodle/*.mm iPhonePrivate.h |
ad8c38ed | 46 | $(cycc) $(filter %.mm,$^) $(flags) $(link) |
d610ce30 | 47 | ldid -Slaunch.xml $@ |
5511bfb1 | 48 | |
1e4922b8 | 49 | package: Cydia |
393ab8b9 | 50 | sudo rm -rf _ |
5511bfb1 JF |
51 | mkdir -p _/var/lib/cydia |
52 | ||
53 | mkdir -p _/usr/libexec | |
1e4922b8 | 54 | cp -a Library _/usr/libexec/cydia |
393ab8b9 | 55 | cp -a sysroot/usr/bin/du _/usr/libexec/cydia |
5511bfb1 JF |
56 | |
57 | mkdir -p _/System/Library | |
1e4922b8 | 58 | cp -a LaunchDaemons _/System/Library/LaunchDaemons |
5511bfb1 JF |
59 | |
60 | mkdir -p _/Applications | |
1e4922b8 | 61 | cp -a Cydia.app _/Applications/Cydia.app |
5511bfb1 | 62 | cp -a Cydia _/Applications/Cydia.app/Cydia_ |
5511bfb1 JF |
63 | |
64 | mkdir -p _/System/Library/PreferenceBundles | |
1e4922b8 | 65 | cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle |
5511bfb1 JF |
66 | |
67 | mkdir -p _/DEBIAN | |
68 | echo "$$(cat control)"$$'\nInstalled-Size: '"$$(du -s _ | cut -f 1)" > _/DEBIAN/control | |
69 | ||
393ab8b9 JF |
70 | sudo chown -R 0 _ |
71 | sudo chgrp -R 0 _ | |
72 | sudo chmod 6755 _/Applications/Cydia.app/Cydia_ | |
73 | ||
1e4922b8 | 74 | $(dpkg) -b _ $(shell grep ^Package: control | cut -d ' ' -f 2-)_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb |
23bcd525 JF |
75 | |
76 | .PHONY: all clean sign |