1 sdks := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs
9 ifeq (o,O) # gzip is actually better
10 dpkg := /Library/Cydia/bin/dpkg-deb
11 ifeq ($(wildcard $(dpkg)),$(dpkg))
12 dpkg := $(dpkg) -zlzma
14 dpkg := dpkg-deb -zbzip2
20 sdk := $(sdks)/iPhoneOS$(ios).sdk
22 flags += -F$(sdk)/System/Library/PrivateFrameworks
23 flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib
24 flags += -Wall -Werror -Wno-deprecated-declarations
25 flags += -fmessage-length=0
27 flags += -fobjc-call-cxx-cdtors -fobjc-exceptions
29 link += -framework CoreFoundation
30 link += -framework CoreGraphics
31 link += -framework Foundation
32 link += -framework GraphicsServices
33 link += -framework IOKit
34 link += -framework JavaScriptCore
35 link += -framework QuartzCore
36 link += -framework SpringBoardServices
37 link += -framework SystemConfiguration
38 link += -framework WebCore
39 link += -framework WebKit
45 link += -multiply_defined suppress
48 uikit += -framework UIKit
51 backrow += -FAppleTV -framework BackRow -framework AppleTV
53 #cycc = cycc -r4.2 -i$(ios) -o$@
54 gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc)
55 cycc = $(gxx) -mthumb -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=2.0 -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks
63 $(cycc) -c -o $@ -x c $<
68 MobileCydia: Version.h MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp
69 $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit)
70 ldid -Slaunch.xml $@ || { rm -f $@ && false; }
72 CydiaAppliance: CydiaAppliance.mm
73 $(cycc) $(filter %.mm,$^) $(flags) -bundle $(link) $(backrow)
77 mkdir -p _/var/lib/cydia
79 mkdir -p _/usr/libexec
80 cp -a Library _/usr/libexec/cydia
81 cp -a sysroot/usr/bin/du _/usr/libexec/cydia
83 mkdir -p _/System/Library
84 cp -a LaunchDaemons _/System/Library/LaunchDaemons
86 mkdir -p _/Applications
87 cp -a MobileCydia.app _/Applications/Cydia.app
88 cp -a MobileCydia _/Applications/Cydia.app/MobileCydia
90 #mkdir -p _/Applications/Lowtide.app/Appliances
91 #cp -a Cydia.frappliance _/Applications/Lowtide.app/Appliances
92 #cp -a CydiaAppliance _/Applications/Lowtide.app/Appliances/Cydia.frappliance
94 mkdir -p _/System/Library/PreferenceBundles
95 cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle
98 ./control.sh _ >_/DEBIAN/control
100 find _ -name '*.png' -exec ./pngcrush.sh '{}' ';'
104 sudo chmod 6755 _/Applications/Cydia.app/MobileCydia
107 ln -sf debs/cydia_$$(./version.sh)_iphoneos-arm.deb Cydia.deb
108 $(dpkg) -b _ Cydia.deb
109 @echo "$$(stat -L -f "%z" Cydia.deb) $$(stat -f "%Y" Cydia.deb)"
111 .PHONY: all clean sign