12 #dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma
15 sdk := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(ios).sdk
17 flags += -F$(sdk)/System/Library/PrivateFrameworks
18 flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib
19 flags += -Wall -Werror -Wno-deprecated-declarations
20 flags += -fmessage-length=0
22 flags += -fobjc-call-cxx-cdtors -fobjc-exceptions
24 link += -framework CoreFoundation
25 link += -framework CoreGraphics
26 link += -framework Foundation
27 link += -framework GraphicsServices
28 link += -framework IOKit
29 link += -framework JavaScriptCore
30 link += -framework QuartzCore
31 link += -framework SystemConfiguration
32 link += -framework WebCore
33 link += -framework WebKit
39 link += -multiply_defined suppress
42 uikit += -framework UIKit
45 backrow += -FAppleTV -framework BackRow -framework AppleTV
47 #cycc = cycc -r4.2 -i$(ios) -o$@
48 gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc)
49 cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=$(ios) -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks
57 $(cycc) -c -o $@ -x c $<
59 MobileCydia: MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm iPhonePrivate.h lookup3.o Cytore.hpp
60 $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(flags) $(link) $(uikit)
61 ldid -Slaunch.xml $@ || { rm -f $@ && false; }
63 CydiaAppliance: CydiaAppliance.mm
64 $(cycc) $(filter %.mm,$^) $(flags) -bundle $(link) $(backrow)
68 mkdir -p _/var/lib/cydia
70 mkdir -p _/usr/libexec
71 cp -a Library _/usr/libexec/cydia
72 cp -a sysroot/usr/bin/du _/usr/libexec/cydia
74 mkdir -p _/System/Library
75 cp -a LaunchDaemons _/System/Library/LaunchDaemons
77 mkdir -p _/Applications
78 cp -a MobileCydia.app _/Applications/Cydia.app
79 cp -a MobileCydia _/Applications/Cydia.app/MobileCydia
81 #mkdir -p _/Applications/Lowtide.app/Appliances
82 #cp -a Cydia.frappliance _/Applications/Lowtide.app/Appliances
83 #cp -a CydiaAppliance _/Applications/Lowtide.app/Appliances/Cydia.frappliance
85 mkdir -p _/System/Library/PreferenceBundles
86 cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle
89 ./control.sh _ >_/DEBIAN/control
93 sudo chmod 6755 _/Applications/Cydia.app/MobileCydia
96 ln -sf debs/cydia_$$(./version.sh)_iphoneos-arm.deb Cydia.deb
97 $(dpkg) -b _ Cydia.deb
100 .PHONY: all clean sign