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