]> git.saurik.com Git - cydia.git/blame_incremental - makefile
Fix iPhonePrivate.h's header insulation.
[cydia.git] / makefile
... / ...
CommitLineData
1ios := 3.2
2
3flags :=
4link :=
5
6#dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma
7dpkg := dpkg-deb
8
9sdk := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(ios).sdk
10
11flags += -F$(sdk)/System/Library/PrivateFrameworks
12flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib
13flags += -Wall -Werror -Wno-deprecated-declarations
14flags += -fmessage-length=0
15flags += -g0 -O2
16flags += -fobjc-call-cxx-cdtors -fobjc-exceptions
17
18link += -framework CoreFoundation
19link += -framework CoreGraphics
20link += -framework Foundation
21link += -framework GraphicsServices
22link += -framework IOKit
23link += -framework JavaScriptCore
24link += -framework QuartzCore
25link += -framework SystemConfiguration
26link += -framework UIKit
27link += -framework WebCore
28link += -framework WebKit
29
30link += -lapr-1
31link += -lapt-pkg
32link += -lpcre
33
34link += -multiply_defined suppress
35
36#cycc = cycc -r4.2 -i$(ios) -o$@
37gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++
38cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=$(ios) -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks
39
40all: Cydia
41
42clean:
43 rm -f Cydia
44
45Cydia: Cydia.mm UICaboodle/*.mm iPhonePrivate.h
46 $(cycc) $(filter %.mm,$^) $(flags) $(link)
47 ldid -Slaunch.xml $@
48
49package: Cydia
50 sudo rm -rf _
51 mkdir -p _/var/lib/cydia
52
53 mkdir -p _/usr/libexec
54 cp -a Library _/usr/libexec/cydia
55 cp -a sysroot/usr/bin/du _/usr/libexec/cydia
56
57 mkdir -p _/System/Library
58 cp -a LaunchDaemons _/System/Library/LaunchDaemons
59
60 mkdir -p _/Applications
61 cp -a Cydia.app _/Applications/Cydia.app
62 cp -a Cydia _/Applications/Cydia.app/Cydia_
63
64 mkdir -p _/System/Library/PreferenceBundles
65 cp -a CydiaSettings.bundle _/System/Library/PreferenceBundles/CydiaSettings.bundle
66
67 mkdir -p _/DEBIAN
68 echo "$$(cat control)"$$'\nInstalled-Size: '"$$(du -s _ | cut -f 1)" > _/DEBIAN/control
69
70 sudo chown -R 0 _
71 sudo chgrp -R 0 _
72 sudo chmod 6755 _/Applications/Cydia.app/Cydia_
73
74 $(dpkg) -b _ $(shell grep ^Package: control | cut -d ' ' -f 2-)_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb
75
76.PHONY: all clean sign