]> git.saurik.com Git - cydia.git/blob - makefile
Added Chinese localization (complete), updated English localization, updated Cydia...
[cydia.git] / makefile
1 sdks := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs
2
3 ifeq ($(findstring iPhoneOS2.0.sdk,$(wildcard $(sdks)/iPhoneOS*.sdk)),)
4 ios := 3.2
5 gcc := 4.2
6 else
7 ios := 2.0
8 gcc := 4.0
9 endif
10
11 flags :=
12 link :=
13
14 #dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma
15 dpkg := dpkg-deb
16
17 sdk := $(sdks)/iPhoneOS$(ios).sdk
18
19 flags += -F$(sdk)/System/Library/PrivateFrameworks
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
33 link += -framework SystemConfiguration
34 link += -framework WebCore
35 link += -framework WebKit
36
37 link += -lapr-1
38 link += -lapt-pkg
39 link += -lpcre
40
41 link += -multiply_defined suppress
42
43 uikit :=
44 uikit += -framework UIKit
45
46 backrow :=
47 backrow += -FAppleTV -framework BackRow -framework AppleTV
48
49 #cycc = cycc -r4.2 -i$(ios) -o$@
50 gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc)
51 cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=$(ios) -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks
52
53 all: MobileCydia
54
55 clean:
56 rm -f MobileCydia
57
58 %.o: %.c
59 $(cycc) -c -o $@ -x c $<
60
61 MobileCydia: MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp
62 $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit)
63 ldid -Slaunch.xml $@ || { rm -f $@ && false; }
64
65 CydiaAppliance: CydiaAppliance.mm
66 $(cycc) $(filter %.mm,$^) $(flags) -bundle $(link) $(backrow)
67
68 package: MobileCydia
69 sudo rm -rf _
70 mkdir -p _/var/lib/cydia
71
72 mkdir -p _/usr/libexec
73 cp -a Library _/usr/libexec/cydia
74 cp -a sysroot/usr/bin/du _/usr/libexec/cydia
75
76 mkdir -p _/System/Library
77 cp -a LaunchDaemons _/System/Library/LaunchDaemons
78
79 mkdir -p _/Applications
80 cp -a MobileCydia.app _/Applications/Cydia.app
81 cp -a MobileCydia _/Applications/Cydia.app/MobileCydia
82
83 #mkdir -p _/Applications/Lowtide.app/Appliances
84 #cp -a Cydia.frappliance _/Applications/Lowtide.app/Appliances
85 #cp -a CydiaAppliance _/Applications/Lowtide.app/Appliances/Cydia.frappliance
86
87 mkdir -p _/System/Library/PreferenceBundles
88 cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle
89
90 mkdir -p _/DEBIAN
91 ./control.sh _ >_/DEBIAN/control
92
93 sudo chown -R 0 _
94 sudo chgrp -R 0 _
95 sudo chmod 6755 _/Applications/Cydia.app/MobileCydia
96
97 mkdir -p debs
98 ln -sf debs/cydia_$$(./version.sh)_iphoneos-arm.deb Cydia.deb
99 $(dpkg) -b _ Cydia.deb
100 readlink Cydia.deb
101
102 .PHONY: all clean sign