2 jscore := JavaScriptCore-521
4 cycc = cycc -i2.0 -o$@ -- $(filter %.mm,$^) -Xarch_armv6 -marm -g0 -O2 -I. -F/System/Library/PrivateFrameworks
6 all: CydgetLoader.dylib WebCycriptLockScreen CydgetSettings
9 rm -f CydgetLoader.dylib CydgetSettings WebCycriptLockScreen
11 CydgetLoader.dylib: CydgetLoader.mm makefile
12 $(cycc) -dynamiclib -framework Foundation -framework UIKit -framework CydiaSubstrate
14 CydgetSettings: CydgetSettings.mm makefile
15 $(cycc) -dynamiclib -framework Foundation -framework UIKit -framework Preferences
17 WebCycriptLockScreen: LockScreen.mm yieldToSelector.mm makefile
18 $(cycc) -bundle -isystem sysroot/usr/include \
19 -I$(jscore) -iquote$(jscore)/{parser,runtime} \
20 -framework Foundation -framework UIKit \
21 -framework CydiaSubstrate -framework CFNetwork \
22 -framework JavaScriptCore -framework WebKit \
23 -framework TelephonyUI -framework SpringBoardUI \
24 -Xarch_armv6 -Lsysroot/usr/lib -Xarch_armv6 -lpcre \
25 -Xarch_arm64 -DUSE_ICU_REGEX -Xarch_arm64 -licucore \
26 -Wl,-U,__ZN3JSC7UString3Rep7destroyEv \
27 -Wl,-U,__ZN3JSC7UStringC1EPKc \
28 -Wl,-U,__ZN3JSC7UStringC1EPKti \
29 -Wl,-U,__ZNK3JSC7UString6substrEii \
30 -Wno-mismatched-tags -Wno-tautological-constant-out-of-range-compare
31 install_name_tool -change /System/Library/{,Private}Frameworks/JavaScriptCore.framework/JavaScriptCore $@
36 mkdir -p package/DEBIAN
37 mkdir -p package/Library/MobileSubstrate/DynamicLibraries
38 sed -e 's/%/$(shell cycc -V)/' control.in >package/DEBIAN/control
39 cp -a preinst package/DEBIAN
40 mkdir -p package/Library/PreferenceLoader/Preferences;
41 cp -a CydgetLoader.{dylib,plist} package/Library/MobileSubstrate/DynamicLibraries
42 mkdir -p package/System/Library/LockCydgets
43 cp -a Welcome.cydget package/System/Library/LockCydgets/Welcome.cydget
44 cp -a AwayView.cydget package/System/Library/LockCydgets/AwayView.cydget
45 cp -a PhotoExample.cydget package/System/Library/LockCydgets/PhotoExample.cydget
46 cp -a PhotoExamplePlus.cydget package/System/Library/LockCydgets/PhotoExamplePlus.cydget
47 mkdir -p package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle
48 cp -a Info.plist package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle
49 cp -a WebCycriptLockScreen package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle
50 mkdir -p package/Library/PreferenceLoader/Preferences
51 mkdir -p package/System/Library/PreferenceBundles
52 cp -a CydgetSettings.plist package/Library/PreferenceLoader/Preferences
53 cp -a CydgetSettings.bundle package/System/Library/PreferenceBundles/CydgetSettings.bundle
54 cp -a Icon-Small.png package/System/Library/PreferenceBundles/CydgetSettings.bundle/icon.png
55 cp -a SearchResultsCheckmarkClear.png CydgetSettings package/System/Library/PreferenceBundles/CydgetSettings.bundle
56 sudo chown -R 0 package
57 sudo chgrp -R 0 package
58 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