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