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