]>
Commit | Line | Data |
---|---|---|
6666381a JF |
1 | sdks := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs |
2 | ||
1e4922b8 | 3 | ios := 3.2 |
e4e75caf JF |
4 | #ios := 2.0 |
5 | ||
6 | ifeq ($(patsubst 2%,2,$(ios)),2) | |
6666381a | 7 | gcc := 4.0 |
e4e75caf JF |
8 | else |
9 | gcc := 4.2 | |
cbc40330 | 10 | endif |
1e4922b8 JF |
11 | |
12 | flags := | |
13 | link := | |
14 | ||
15 | #dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma | |
16 | dpkg := dpkg-deb | |
17 | ||
6666381a | 18 | sdk := $(sdks)/iPhoneOS$(ios).sdk |
ad8c38ed JF |
19 | |
20 | flags += -F$(sdk)/System/Library/PrivateFrameworks | |
1e4922b8 JF |
21 | flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib |
22 | flags += -Wall -Werror -Wno-deprecated-declarations | |
23 | flags += -fmessage-length=0 | |
24 | flags += -g0 -O2 | |
25 | flags += -fobjc-call-cxx-cdtors -fobjc-exceptions | |
26 | ||
27 | link += -framework CoreFoundation | |
28 | link += -framework CoreGraphics | |
29 | link += -framework Foundation | |
30 | link += -framework GraphicsServices | |
31 | link += -framework IOKit | |
32 | link += -framework JavaScriptCore | |
33 | link += -framework QuartzCore | |
92cb9864 | 34 | link += -framework SpringBoardServices |
1e4922b8 | 35 | link += -framework SystemConfiguration |
1e4922b8 JF |
36 | link += -framework WebCore |
37 | link += -framework WebKit | |
38 | ||
39 | link += -lapr-1 | |
40 | link += -lapt-pkg | |
41 | link += -lpcre | |
42 | ||
43 | link += -multiply_defined suppress | |
b0d03ade | 44 | |
471937c6 JF |
45 | uikit := |
46 | uikit += -framework UIKit | |
47 | ||
48 | backrow := | |
49 | backrow += -FAppleTV -framework BackRow -framework AppleTV | |
50 | ||
ad8c38ed | 51 | #cycc = cycc -r4.2 -i$(ios) -o$@ |
cbc40330 | 52 | gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc) |
e4e75caf | 53 | cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=2.0 -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks |
ad8c38ed | 54 | |
471937c6 | 55 | all: MobileCydia |
a75f53e7 | 56 | |
b0d03ade | 57 | clean: |
471937c6 | 58 | rm -f MobileCydia |
b0d03ade | 59 | |
8b5085e6 JF |
60 | %.o: %.c |
61 | $(cycc) -c -o $@ -x c $< | |
62 | ||
e12c175e JF |
63 | MobileCydia: MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp |
64 | $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit) | |
c1cb3a17 | 65 | ldid -Slaunch.xml $@ || { rm -f $@ && false; } |
5511bfb1 | 66 | |
471937c6 JF |
67 | CydiaAppliance: CydiaAppliance.mm |
68 | $(cycc) $(filter %.mm,$^) $(flags) -bundle $(link) $(backrow) | |
69 | ||
70 | package: MobileCydia | |
393ab8b9 | 71 | sudo rm -rf _ |
5511bfb1 JF |
72 | mkdir -p _/var/lib/cydia |
73 | ||
74 | mkdir -p _/usr/libexec | |
1e4922b8 | 75 | cp -a Library _/usr/libexec/cydia |
393ab8b9 | 76 | cp -a sysroot/usr/bin/du _/usr/libexec/cydia |
5511bfb1 JF |
77 | |
78 | mkdir -p _/System/Library | |
1e4922b8 | 79 | cp -a LaunchDaemons _/System/Library/LaunchDaemons |
5511bfb1 JF |
80 | |
81 | mkdir -p _/Applications | |
471937c6 JF |
82 | cp -a MobileCydia.app _/Applications/Cydia.app |
83 | cp -a MobileCydia _/Applications/Cydia.app/MobileCydia | |
84 | ||
85 | #mkdir -p _/Applications/Lowtide.app/Appliances | |
86 | #cp -a Cydia.frappliance _/Applications/Lowtide.app/Appliances | |
87 | #cp -a CydiaAppliance _/Applications/Lowtide.app/Appliances/Cydia.frappliance | |
5511bfb1 JF |
88 | |
89 | mkdir -p _/System/Library/PreferenceBundles | |
1e4922b8 | 90 | cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle |
5511bfb1 JF |
91 | |
92 | mkdir -p _/DEBIAN | |
9b3dc53f | 93 | ./control.sh _ >_/DEBIAN/control |
5511bfb1 | 94 | |
393ab8b9 JF |
95 | sudo chown -R 0 _ |
96 | sudo chgrp -R 0 _ | |
471937c6 | 97 | sudo chmod 6755 _/Applications/Cydia.app/MobileCydia |
393ab8b9 | 98 | |
9b3dc53f JF |
99 | mkdir -p debs |
100 | ln -sf debs/cydia_$$(./version.sh)_iphoneos-arm.deb Cydia.deb | |
101 | $(dpkg) -b _ Cydia.deb | |
102 | readlink Cydia.deb | |
23bcd525 JF |
103 | |
104 | .PHONY: all clean sign |