]>
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 | |
32 | link += -framework UIKit | |
33 | link += -framework WebCore | |
34 | link += -framework WebKit | |
35 | ||
36 | link += -lapr-1 | |
37 | link += -lapt-pkg | |
38 | link += -lpcre | |
39 | ||
40 | link += -multiply_defined suppress | |
5f6bff8c | 41 | |
ee4120ad | 42 | #cycc = cycc -r4.2 -i$(ios) -o$@ |
89b0ea4a | 43 | gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc) |
ee4120ad JF |
44 | cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=$(ios) -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks |
45 | ||
fd7853a6 | 46 | all: Cydia |
dc5812ec | 47 | |
5f6bff8c | 48 | clean: |
fd7853a6 | 49 | rm -f Cydia |
5f6bff8c | 50 | |
afb5333a | 51 | Cydia: Cydia.mm UICaboodle/*.mm iPhonePrivate.h |
ee4120ad | 52 | $(cycc) $(filter %.mm,$^) $(flags) $(link) |
19f0811d | 53 | ldid -Slaunch.xml $@ |
03c0f7a9 | 54 | |
c21004b9 | 55 | package: Cydia |
7e2bd591 | 56 | sudo rm -rf _ |
03c0f7a9 JF |
57 | mkdir -p _/var/lib/cydia |
58 | ||
59 | mkdir -p _/usr/libexec | |
c21004b9 | 60 | cp -a Library _/usr/libexec/cydia |
7e2bd591 | 61 | cp -a sysroot/usr/bin/du _/usr/libexec/cydia |
03c0f7a9 JF |
62 | |
63 | mkdir -p _/System/Library | |
c21004b9 | 64 | cp -a LaunchDaemons _/System/Library/LaunchDaemons |
03c0f7a9 JF |
65 | |
66 | mkdir -p _/Applications | |
c21004b9 | 67 | cp -a Cydia.app _/Applications/Cydia.app |
03c0f7a9 | 68 | cp -a Cydia _/Applications/Cydia.app/Cydia_ |
03c0f7a9 JF |
69 | |
70 | mkdir -p _/System/Library/PreferenceBundles | |
c21004b9 | 71 | cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle |
03c0f7a9 JF |
72 | |
73 | mkdir -p _/DEBIAN | |
74 | echo "$$(cat control)"$$'\nInstalled-Size: '"$$(du -s _ | cut -f 1)" > _/DEBIAN/control | |
75 | ||
7e2bd591 JF |
76 | sudo chown -R 0 _ |
77 | sudo chgrp -R 0 _ | |
78 | sudo chmod 6755 _/Applications/Cydia.app/Cydia_ | |
79 | ||
c21004b9 | 80 | $(dpkg) -b _ $(shell grep ^Package: control | cut -d ' ' -f 2-)_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb |
8cc774c5 JF |
81 | |
82 | .PHONY: all clean sign |