]> git.saurik.com Git - winterboard.git/blame - makefile
Use git describe for Version:.
[winterboard.git] / makefile
CommitLineData
cf8bb1d4
JF
1ifndef PKG_TARG
2target :=
3else
4target := $(PKG_TARG)-
5endif
6
24ba43ee
JF
7substrate := -I../mobilesubstrate -L../mobilesubstrate -lsubstrate
8
265e19b2 9all: WinterBoard WinterBoard.dylib UIImages WinterBoardSettings Optimize
cf8bb1d4
JF
10
11clean:
ca13798d 12 rm -f WinterBoard WinterBoard.dylib UIImages
cf8bb1d4 13
224d48e3
JF
14WinterBoardSettings: Settings.mm makefile
15 $(target)g++ -dynamiclib -g0 -O2 -Wall -o $@ $(filter %.mm,$^) -framework UIKit -framework CoreFoundation -framework Foundation -lobjc -framework CoreGraphics -framework Preferences -F$(PKG_ROOT)/System/Library/PrivateFrameworks
16 ldid -S $@
17
2acbe5b8 18WinterBoard.dylib: Library.mm makefile ../mobilesubstrate/substrate.h
f64efe8d 19 $(target)g++ -dynamiclib -g0 -O2 -Wall -o $@ $(filter %.mm,$^) -framework CoreFoundation -framework Foundation -lobjc -init _WBInitialize -I/apl/inc/iPhoneOS-2.0 -framework CoreGraphics -framework ImageIO -framework GraphicsServices -framework Celestial $(substrate) -framework UIKit -F$(PKG_ROOT)/System/Library/PrivateFrameworks
224d48e3 20 ldid -S $@
cf8bb1d4 21
ca13798d 22UIImages: UIImages.mm makefile
24ba43ee 23 $(target)g++ -g0 -O2 -Wall -Werror -o $@ $(filter %.mm,$^) -framework UIKit -framework Foundation -framework CoreFoundation -lobjc -I/apl/inc/iPhoneOS-2.0 $(substrate)
224d48e3 24 ldid -S $@
ca13798d 25
62b2dbad 26WinterBoard: Application.mm makefile
224d48e3
JF
27 $(target)g++ -g0 -O2 -Wall -Werror -o $@ $(filter %.mm,$^) -framework UIKit -framework Foundation -framework CoreFoundation -lobjc -framework CoreGraphics -I/apl/sdk -framework Preferences -F$(PKG_ROOT)/System/Library/PrivateFrameworks
28 ldid -S $@
62b2dbad 29
265e19b2
JF
30Optimize: Optimize.cpp makefile
31 $(target)g++ -g0 -O2 -Wall -Werror -o $@ $(filter %.cpp,$^)
32 ldid -S $@
33
34package: all
62b2dbad
JF
35 rm -rf winterboard
36 mkdir -p winterboard/DEBIAN
37 mkdir -p winterboard/Applications/WinterBoard.app
26c43b47 38 mkdir -p winterboard/Library/Themes
d5fb6e01 39 mkdir -p winterboard/Library/MobileSubstrate/DynamicLibraries
224d48e3
JF
40 mkdir -p winterboard/Library/PreferenceLoader/Preferences
41 mkdir -p winterboard/System/Library/PreferenceBundles
265e19b2
JF
42 mkdir -p winterboard/usr/libexec/winterboard
43 cp -a Optimize winterboard/usr/libexec/winterboard
44 chmod 6755 winterboard/usr/libexec/winterboard/Optimize
224d48e3
JF
45 cp -a WinterBoardSettings.plist winterboard/Library/PreferenceLoader/Preferences
46 cp -a WinterBoardSettings.bundle winterboard/System/Library/PreferenceBundles
47 cp -a Icon-Small.png winterboard/System/Library/PreferenceBundles/WinterBoardSettings.bundle/icon.png
48 cp -a SearchResultsCheckmarkClear.png WinterBoardSettings winterboard/System/Library/PreferenceBundles/WinterBoardSettings.bundle
d5fb6e01 49 ln -s /Applications/WinterBoard.app/WinterBoard.dylib winterboard/Library/MobileSubstrate/DynamicLibraries
2acbe5b8 50 cp -a WinterBoard.plist winterboard/Library/MobileSubstrate/DynamicLibraries
d5fb6e01 51 cp -a *.theme winterboard/Library/Themes
224d48e3 52 find winterboard -name .svn | while read -r line; do rm -rf "$${line}"; done
ab55ac63
JF
53 cp -a extrainst_ preinst prerm winterboard/DEBIAN
54 sed -e 's/VERSION/$(shell ./version.sh)/g' control >winterboard/DEBIAN/control
9c64bab2 55 cp -a Test.sh Icon-Small.png icon.png WinterBoard.dylib WinterBoard UIImages Info.plist winterboard/Applications/WinterBoard.app
ab55ac63 56 dpkg-deb -b winterboard "winterboard_$$(grep ^Version: winterboard/DEBIAN/control | cut -d ' ' -f 2)_iphoneos-arm.deb"
62b2dbad
JF
57
58.PHONY: all clean package