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