]> git.saurik.com Git - cydget.git/blob - makefile
Support iOS 9.0 (Apple moved handleMenuButtonTap).
[cydget.git] / makefile
1 webcore := WebCore-514
2 jscore := JavaScriptCore-521
3
4 cycc = cycc -i2.0 -o$@ -- $(filter %.mm,$^) -Xarch_armv6 -marm -g0 -O2 -I. -F/System/Library/PrivateFrameworks
5
6 all := CydgetLoader.dylib WebCycript WebCycriptLockScreen CydgetSettings
7
8 all: $(all)
9
10 clean::
11 rm -f $(all)
12
13 CydgetLoader.dylib: CydgetLoader.mm makefile
14 $(cycc) -dynamiclib -framework Foundation -framework UIKit -framework CydiaSubstrate
15
16 CydgetSettings: CydgetSettings.mm makefile
17 $(cycc) -dynamiclib -framework Foundation -framework UIKit -framework Preferences
18
19 WebCycript: WebCycript.mm yieldToSelector.mm makefile
20 $(cycc) -dynamiclib -isystem sysroot/usr/include \
21 -install_name /Library/Frameworks/WebCycript.framework/WebCycript \
22 -framework Foundation -framework UIKit \
23 -framework CydiaSubstrate -framework CFNetwork \
24 -framework JavaScriptCore -framework WebKit \
25 -Wl,-U,__ZN3JSC7UString3Rep7destroyEv \
26 -Wl,-U,__ZN3JSC7UStringC1EPKc \
27 -Wl,-U,__ZN3JSC7UStringC1EPKti \
28 -Wl,-U,__ZNK3JSC7UString6substrEii
29 install_name_tool -change /System/Library/{,Private}Frameworks/JavaScriptCore.framework/JavaScriptCore $@
30 ldid -S $@
31
32 WebCycriptLockScreen: WebCycript LockScreen.mm makefile
33 $(cycc) -bundle -isystem sysroot/usr/include \
34 -framework Foundation -framework UIKit \
35 -framework CydiaSubstrate WebCycript \
36 -framework TelephonyUI -framework SpringBoardUI \
37 -Xarch_armv6 -Lsysroot/usr/lib -Xarch_armv6 -lpcre \
38 -Xarch_arm64 -DUSE_ICU_REGEX -Xarch_arm64 -licucore
39
40 webcycript-deb: all
41 sudo rm -rf package
42 mkdir -p package/DEBIAN
43 mkdir -p package/Library/MobileSubstrate/DynamicLibraries
44 sed -e 's/%/$(shell cycc -V)/' webcycript.in >package/DEBIAN/control
45 mkdir -p package/Library/Frameworks/WebCycript.framework/Headers
46 cp -a WebCycript.plist package/Library/Frameworks/WebCycript.framework/Info.plist
47 cp -a WebCycript package/Library/Frameworks/WebCycript.framework
48 cp -a WebCycript.h package/Library/Frameworks/WebCycript.framework/Headers
49 sudo chown -R 0 package
50 sudo chgrp -R 0 package
51 deb=$$(grep ^Package: package/DEBIAN/control | cut -d ' ' -f 2-)_$$(grep ^Version: package/DEBIAN/control | cut -d ' ' -f 2)_iphoneos-arm.deb; dpkg-deb -b package "$$deb"; ln -sfv "$$deb" webcycript.deb
52
53 cydget-deb: all
54 sudo rm -rf package
55 mkdir -p package/DEBIAN
56 mkdir -p package/Library/MobileSubstrate/DynamicLibraries
57 sed -e 's/%/$(shell cycc -V)/' cydget.in >package/DEBIAN/control
58 cp -a preinst package/DEBIAN
59 mkdir -p package/Library/PreferenceLoader/Preferences;
60 cp -a CydgetLoader.{dylib,plist} package/Library/MobileSubstrate/DynamicLibraries
61 mkdir -p package/System/Library/LockCydgets
62 cp -a Welcome.cydget package/System/Library/LockCydgets/Welcome.cydget
63 cp -a AwayView.cydget package/System/Library/LockCydgets/AwayView.cydget
64 cp -a PhotoExample.cydget package/System/Library/LockCydgets/PhotoExample.cydget
65 cp -a PhotoExamplePlus.cydget package/System/Library/LockCydgets/PhotoExamplePlus.cydget
66 mkdir -p package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle
67 cp -a WebCycriptLockScreen.plist package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle/Info.plist
68 cp -a WebCycriptLockScreen package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle
69 mkdir -p package/Library/PreferenceLoader/Preferences
70 mkdir -p package/System/Library/PreferenceBundles
71 cp -a CydgetSettings.plist package/Library/PreferenceLoader/Preferences
72 cp -a CydgetSettings.bundle package/System/Library/PreferenceBundles/CydgetSettings.bundle
73 cp -a Icon-Small.png package/System/Library/PreferenceBundles/CydgetSettings.bundle/icon.png
74 cp -a SearchResultsCheckmarkClear.png CydgetSettings package/System/Library/PreferenceBundles/CydgetSettings.bundle
75 sudo chown -R 0 package
76 sudo chgrp -R 0 package
77 deb=$$(grep ^Package: package/DEBIAN/control | cut -d ' ' -f 2-)_$$(grep ^Version: package/DEBIAN/control | cut -d ' ' -f 2)_iphoneos-arm.deb; dpkg-deb -b package "$$deb"; ln -sfv "$$deb" cydget.deb
78
79 deb: webcycript-deb cydget-deb