]>
Commit | Line | Data |
---|---|---|
c21004b9 JF |
1 | ios := 3.2 |
2 | ||
3 | flags := | |
4 | link := | |
5 | ||
6 | #dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma | |
7 | dpkg := dpkg-deb | |
8 | ||
ee4120ad JF |
9 | sdk := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(ios).sdk |
10 | ||
11 | flags += -F$(sdk)/System/Library/PrivateFrameworks | |
c21004b9 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 | |
5f6bff8c | 35 | |
ee4120ad 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 | ||
fd7853a6 | 40 | all: Cydia |
dc5812ec | 41 | |
5f6bff8c | 42 | clean: |
fd7853a6 | 43 | rm -f Cydia |
5f6bff8c | 44 | |
f4932d17 | 45 | Cydia: Cydia.mm Reachability.mm UICaboodle/*.mm iPhonePrivate.h |
ee4120ad | 46 | $(cycc) $(filter %.mm,$^) $(flags) $(link) |
03c0f7a9 | 47 | |
c21004b9 | 48 | package: Cydia |
7e2bd591 | 49 | sudo rm -rf _ |
03c0f7a9 JF |
50 | mkdir -p _/var/lib/cydia |
51 | ||
52 | mkdir -p _/usr/libexec | |
c21004b9 | 53 | cp -a Library _/usr/libexec/cydia |
7e2bd591 | 54 | cp -a sysroot/usr/bin/du _/usr/libexec/cydia |
03c0f7a9 JF |
55 | |
56 | mkdir -p _/System/Library | |
c21004b9 | 57 | cp -a LaunchDaemons _/System/Library/LaunchDaemons |
03c0f7a9 JF |
58 | |
59 | mkdir -p _/Applications | |
c21004b9 | 60 | cp -a Cydia.app _/Applications/Cydia.app |
03c0f7a9 | 61 | cp -a Cydia _/Applications/Cydia.app/Cydia_ |
03c0f7a9 JF |
62 | |
63 | mkdir -p _/System/Library/PreferenceBundles | |
c21004b9 | 64 | cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle |
03c0f7a9 JF |
65 | |
66 | mkdir -p _/DEBIAN | |
67 | echo "$$(cat control)"$$'\nInstalled-Size: '"$$(du -s _ | cut -f 1)" > _/DEBIAN/control | |
68 | ||
7e2bd591 JF |
69 | sudo chown -R 0 _ |
70 | sudo chgrp -R 0 _ | |
71 | sudo chmod 6755 _/Applications/Cydia.app/Cydia_ | |
72 | ||
c21004b9 | 73 | $(dpkg) -b _ $(shell grep ^Package: control | cut -d ' ' -f 2-)_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb |
8cc774c5 JF |
74 | |
75 | .PHONY: all clean sign |