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