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