]> git.saurik.com Git - cydia.git/blame - makefile
Expose allowsAnyHTTPSCertificateForHost private API.
[cydia.git] / makefile
CommitLineData
0263db76
JF
1sdks := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs
2
ac450bee 3ios := 4.0
670fdb01 4gcc := 4.2
c21004b9
JF
5
6flags :=
7link :=
8
d1ba8fd3
JF
9ifeq (o,O) # gzip is actually better
10dpkg := /Library/Cydia/bin/dpkg-deb
11ifeq ($(wildcard $(dpkg)),$(dpkg))
12dpkg := $(dpkg) -zlzma
13else
14dpkg := dpkg-deb -zbzip2
15endif
16else
c21004b9 17dpkg := dpkg-deb
d1ba8fd3 18endif
c21004b9 19
0263db76 20sdk := $(sdks)/iPhoneOS$(ios).sdk
ee4120ad
JF
21
22flags += -F$(sdk)/System/Library/PrivateFrameworks
c21004b9
JF
23flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib
24flags += -Wall -Werror -Wno-deprecated-declarations
25flags += -fmessage-length=0
26flags += -g0 -O2
27flags += -fobjc-call-cxx-cdtors -fobjc-exceptions
28
29link += -framework CoreFoundation
30link += -framework CoreGraphics
31link += -framework Foundation
32link += -framework GraphicsServices
33link += -framework IOKit
34link += -framework JavaScriptCore
35link += -framework QuartzCore
0e371502 36link += -framework SpringBoardServices
c21004b9 37link += -framework SystemConfiguration
c21004b9
JF
38link += -framework WebCore
39link += -framework WebKit
40
41link += -lapr-1
42link += -lapt-pkg
43link += -lpcre
44
45link += -multiply_defined suppress
5f6bff8c 46
e17a8c4f
JF
47uikit :=
48uikit += -framework UIKit
49
50backrow :=
51backrow += -FAppleTV -framework BackRow -framework AppleTV
52
ee4120ad 53#cycc = cycc -r4.2 -i$(ios) -o$@
89b0ea4a 54gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc)
91107ccf 55cycc = $(gxx) -mthumb -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=2.0 -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks
ee4120ad 56
e17a8c4f 57all: MobileCydia
dc5812ec 58
5f6bff8c 59clean:
e17a8c4f 60 rm -f MobileCydia
5f6bff8c 61
e95a1972
JF
62%.o: %.c
63 $(cycc) -c -o $@ -x c $<
64
44c1771c
JF
65Version.h:
66 ./Version.h.sh
67
8a2c6d14
JF
68sysroot:
69 @echo "Please read compiling.txt: you do not have a ./sysroot/ folder with the on-device requirements." 1>&2
70 @echo 1>&2
71 @exit 1
72
73MobileCydia: sysroot Version.h MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp
71cc7be1 74 $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit)
b7cc8ce2 75 ldid -Slaunch.xml $@ || { rm -f $@ && false; }
03c0f7a9 76
e17a8c4f
JF
77CydiaAppliance: CydiaAppliance.mm
78 $(cycc) $(filter %.mm,$^) $(flags) -bundle $(link) $(backrow)
79
80package: MobileCydia
7e2bd591 81 sudo rm -rf _
03c0f7a9
JF
82 mkdir -p _/var/lib/cydia
83
84 mkdir -p _/usr/libexec
c21004b9 85 cp -a Library _/usr/libexec/cydia
7e2bd591 86 cp -a sysroot/usr/bin/du _/usr/libexec/cydia
03c0f7a9
JF
87
88 mkdir -p _/System/Library
c21004b9 89 cp -a LaunchDaemons _/System/Library/LaunchDaemons
03c0f7a9
JF
90
91 mkdir -p _/Applications
e17a8c4f
JF
92 cp -a MobileCydia.app _/Applications/Cydia.app
93 cp -a MobileCydia _/Applications/Cydia.app/MobileCydia
94
95 #mkdir -p _/Applications/Lowtide.app/Appliances
96 #cp -a Cydia.frappliance _/Applications/Lowtide.app/Appliances
97 #cp -a CydiaAppliance _/Applications/Lowtide.app/Appliances/Cydia.frappliance
03c0f7a9
JF
98
99 mkdir -p _/System/Library/PreferenceBundles
c21004b9 100 cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle
03c0f7a9
JF
101
102 mkdir -p _/DEBIAN
3adcfba7 103 ./control.sh _ >_/DEBIAN/control
03c0f7a9 104
7fc02989
JF
105 find _ -name '*.png' -exec ./pngcrush.sh '{}' ';'
106
7e2bd591
JF
107 sudo chown -R 0 _
108 sudo chgrp -R 0 _
e17a8c4f 109 sudo chmod 6755 _/Applications/Cydia.app/MobileCydia
7e2bd591 110
3adcfba7
JF
111 mkdir -p debs
112 ln -sf debs/cydia_$$(./version.sh)_iphoneos-arm.deb Cydia.deb
113 $(dpkg) -b _ Cydia.deb
ce0372db 114 @echo "$$(stat -L -f "%z" Cydia.deb) $$(stat -f "%Y" Cydia.deb)"
8cc774c5
JF
115
116.PHONY: all clean sign