1 sdks := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs
6 ifeq ($(patsubst 2%,2,$(ios)),2)
15 ifeq (o,O) # gzip is actually better
16 dpkg := /Library/Cydia/bin/dpkg-deb
17 ifeq ($(wildcard $(dpkg)),$(dpkg))
18 dpkg := $(dpkg) -zlzma
20 dpkg := dpkg-deb -zbzip2
26 sdk := $(sdks)/iPhoneOS$(ios).sdk
28 flags += -F$(sdk)/System/Library/PrivateFrameworks
29 flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib
30 flags += -Wall -Werror -Wno-deprecated-declarations
31 flags += -fmessage-length=0
33 flags += -fobjc-call-cxx-cdtors -fobjc-exceptions
35 link += -framework CoreFoundation
36 link += -framework CoreGraphics
37 link += -framework Foundation
38 link += -framework GraphicsServices
39 link += -framework IOKit
40 link += -framework JavaScriptCore
41 link += -framework QuartzCore
42 link += -framework SpringBoardServices
43 link += -framework SystemConfiguration
44 link += -framework WebCore
45 link += -framework WebKit
51 link += -multiply_defined suppress
54 uikit += -framework UIKit
57 backrow += -FAppleTV -framework BackRow -framework AppleTV
59 #cycc = cycc -r4.2 -i$(ios) -o$@
60 gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc)
61 cycc = $(gxx) -mthumb -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=2.0 -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks
69 $(cycc) -c -o $@ -x c $<
74 MobileCydia: Version.h MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp
75 $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit)
76 ldid -Slaunch.xml $@ || { rm -f $@ && false; }
78 CydiaAppliance: CydiaAppliance.mm
79 $(cycc) $(filter %.mm,$^) $(flags) -bundle $(link) $(backrow)
83 mkdir -p _/var/lib/cydia
85 mkdir -p _/usr/libexec
86 cp -a Library _/usr/libexec/cydia
87 cp -a sysroot/usr/bin/du _/usr/libexec/cydia
89 mkdir -p _/System/Library
90 cp -a LaunchDaemons _/System/Library/LaunchDaemons
92 mkdir -p _/Applications
93 cp -a MobileCydia.app _/Applications/Cydia.app
94 cp -a MobileCydia _/Applications/Cydia.app/MobileCydia
96 #mkdir -p _/Applications/Lowtide.app/Appliances
97 #cp -a Cydia.frappliance _/Applications/Lowtide.app/Appliances
98 #cp -a CydiaAppliance _/Applications/Lowtide.app/Appliances/Cydia.frappliance
100 mkdir -p _/System/Library/PreferenceBundles
101 cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle
104 ./control.sh _ >_/DEBIAN/control
106 find _ -name '*.png' -exec ./pngcrush.sh '{}' ';'
110 sudo chmod 6755 _/Applications/Cydia.app/MobileCydia
113 ln -sf debs/cydia_$$(./version.sh)_iphoneos-arm.deb Cydia.deb
114 $(dpkg) -b _ Cydia.deb
115 @echo "$$(stat -L -f "%z" Cydia.deb) $$(stat -f "%Y" Cydia.deb)"
117 .PHONY: all clean sign