]>
Commit | Line | Data |
---|---|---|
cbc40330 JF |
1 | ifeq (o,O) |
2 | ios := 2.0 | |
3 | gcc := 4.0 | |
4 | else | |
1e4922b8 | 5 | ios := 3.2 |
cbc40330 JF |
6 | gcc := 4.2 |
7 | endif | |
1e4922b8 JF |
8 | |
9 | flags := | |
10 | link := | |
11 | ||
12 | #dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma | |
13 | dpkg := dpkg-deb | |
14 | ||
ad8c38ed JF |
15 | sdk := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(ios).sdk |
16 | ||
17 | flags += -F$(sdk)/System/Library/PrivateFrameworks | |
1e4922b8 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 | |
1e4922b8 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 | |
b0d03ade | 40 | |
471937c6 JF |
41 | uikit := |
42 | uikit += -framework UIKit | |
43 | ||
44 | backrow := | |
45 | backrow += -FAppleTV -framework BackRow -framework AppleTV | |
46 | ||
ad8c38ed | 47 | #cycc = cycc -r4.2 -i$(ios) -o$@ |
cbc40330 | 48 | gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc) |
ad8c38ed JF |
49 | cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=$(ios) -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks |
50 | ||
471937c6 | 51 | all: MobileCydia |
a75f53e7 | 52 | |
b0d03ade | 53 | clean: |
471937c6 | 54 | rm -f MobileCydia |
b0d03ade | 55 | |
c1cb3a17 | 56 | MobileCydia: MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm iPhonePrivate.h |
471937c6 | 57 | $(cycc) $(filter %.mm,$^) $(flags) $(link) $(uikit) |
c1cb3a17 | 58 | ldid -Slaunch.xml $@ || { rm -f $@ && false; } |
5511bfb1 | 59 | |
471937c6 JF |
60 | CydiaAppliance: CydiaAppliance.mm |
61 | $(cycc) $(filter %.mm,$^) $(flags) -bundle $(link) $(backrow) | |
62 | ||
63 | package: MobileCydia | |
393ab8b9 | 64 | sudo rm -rf _ |
5511bfb1 JF |
65 | mkdir -p _/var/lib/cydia |
66 | ||
67 | mkdir -p _/usr/libexec | |
1e4922b8 | 68 | cp -a Library _/usr/libexec/cydia |
393ab8b9 | 69 | cp -a sysroot/usr/bin/du _/usr/libexec/cydia |
5511bfb1 JF |
70 | |
71 | mkdir -p _/System/Library | |
1e4922b8 | 72 | cp -a LaunchDaemons _/System/Library/LaunchDaemons |
5511bfb1 JF |
73 | |
74 | mkdir -p _/Applications | |
471937c6 JF |
75 | cp -a MobileCydia.app _/Applications/Cydia.app |
76 | cp -a MobileCydia _/Applications/Cydia.app/MobileCydia | |
77 | ||
78 | #mkdir -p _/Applications/Lowtide.app/Appliances | |
79 | #cp -a Cydia.frappliance _/Applications/Lowtide.app/Appliances | |
80 | #cp -a CydiaAppliance _/Applications/Lowtide.app/Appliances/Cydia.frappliance | |
5511bfb1 JF |
81 | |
82 | mkdir -p _/System/Library/PreferenceBundles | |
1e4922b8 | 83 | cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle |
5511bfb1 JF |
84 | |
85 | mkdir -p _/DEBIAN | |
86 | echo "$$(cat control)"$$'\nInstalled-Size: '"$$(du -s _ | cut -f 1)" > _/DEBIAN/control | |
87 | ||
393ab8b9 JF |
88 | sudo chown -R 0 _ |
89 | sudo chgrp -R 0 _ | |
471937c6 | 90 | sudo chmod 6755 _/Applications/Cydia.app/MobileCydia |
393ab8b9 | 91 | |
1e4922b8 | 92 | $(dpkg) -b _ $(shell grep ^Package: control | cut -d ' ' -f 2-)_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb |
23bcd525 JF |
93 | |
94 | .PHONY: all clean sign |