1 sdks := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs
3 ifeq ($(findstring iPhoneOS2.0.sdk,$(wildcard $(sdks)/iPhoneOS*.sdk)),)
14 #dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma
17 sdk := $(sdks)/iPhoneOS$(ios).sdk
19 flags += -F$(sdk)/System/Library/PrivateFrameworks
20 flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib
21 flags += -Wall -Werror -Wno-deprecated-declarations
22 flags += -fmessage-length=0
24 flags += -fobjc-call-cxx-cdtors -fobjc-exceptions
26 link += -framework CoreFoundation
27 link += -framework CoreGraphics
28 link += -framework Foundation
29 link += -framework GraphicsServices
30 link += -framework IOKit
31 link += -framework JavaScriptCore
32 link += -framework QuartzCore
33 link += -framework SpringBoardServices
34 link += -framework SystemConfiguration
35 link += -framework WebCore
36 link += -framework WebKit
42 link += -multiply_defined suppress
45 uikit += -framework UIKit
48 backrow += -FAppleTV -framework BackRow -framework AppleTV
50 #cycc = cycc -r4.2 -i$(ios) -o$@
51 gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc)
52 cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=$(ios) -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks
60 $(cycc) -c -o $@ -x c $<
62 MobileCydia: MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp
63 $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit)
64 ldid -Slaunch.xml $@ || { rm -f $@ && false; }
66 CydiaAppliance: CydiaAppliance.mm
67 $(cycc) $(filter %.mm,$^) $(flags) -bundle $(link) $(backrow)
71 mkdir -p _/var/lib/cydia
73 mkdir -p _/usr/libexec
74 cp -a Library _/usr/libexec/cydia
75 cp -a sysroot/usr/bin/du _/usr/libexec/cydia
77 mkdir -p _/System/Library
78 cp -a LaunchDaemons _/System/Library/LaunchDaemons
80 mkdir -p _/Applications
81 cp -a MobileCydia.app _/Applications/Cydia.app
82 cp -a MobileCydia _/Applications/Cydia.app/MobileCydia
84 #mkdir -p _/Applications/Lowtide.app/Appliances
85 #cp -a Cydia.frappliance _/Applications/Lowtide.app/Appliances
86 #cp -a CydiaAppliance _/Applications/Lowtide.app/Appliances/Cydia.frappliance
88 mkdir -p _/System/Library/PreferenceBundles
89 cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle
92 ./control.sh _ >_/DEBIAN/control
96 sudo chmod 6755 _/Applications/Cydia.app/MobileCydia
99 ln -sf debs/cydia_$$(./version.sh)_iphoneos-arm.deb Cydia.deb
100 $(dpkg) -b _ Cydia.deb
103 .PHONY: all clean sign