]>
Commit | Line | Data |
---|---|---|
ec4c25d4 JF |
1 | library := libpatcyh.dylib |
2 | package := com.saurik.patcyh | |
3 | control := extrainst_ postrm | |
4 | ||
5 | all: $(library) | |
6 | ||
7 | clean: | |
8 | rm -f $(library) $(control) | |
9 | ||
10 | .PHONY: all clean package | |
11 | ||
12 | flags := -Os -Werror | |
13 | flags += -framework CoreFoundation | |
14 | flags += -framework Foundation | |
c3315f13 | 15 | flags += -marm |
ec4c25d4 JF |
16 | |
17 | lib%.dylib: %.mm | |
18 | cycc -i2.0 -o$@ -- -dynamiclib $(flags) $(filter-out %.hpp,$^) $($@) -lobjc | |
19 | ||
20 | %: %.mm patch.hpp | |
21 | cycc -i2.0 -o$@ -- $(filter-out %.hpp,$^) $(flags) $($@) | |
22 | ||
23 | package: all $(control) | |
24 | sudo rm -rf _ | |
8cfcde32 JF |
25 | mkdir -p _/Library/MobileSubstrate/DynamicLibraries |
26 | cp -a patcyh.plist _/Library/MobileSubstrate/DynamicLibraries | |
27 | ln -s /usr/lib/libpatcyh.dylib _/Library/MobileSubstrate/DynamicLibraries/patcyh.dylib | |
ec4c25d4 JF |
28 | mkdir -p _/usr/lib |
29 | cp -a $(library) _/usr/lib | |
30 | mkdir -p _/DEBIAN | |
31 | ./control.sh _ >_/DEBIAN/control | |
32 | cp -a extrainst_ _/DEBIAN/ | |
33 | cp -a postrm _/DEBIAN/ | |
34 | mkdir -p debs | |
35 | ln -sf debs/$(package)_$$(./version.sh)_iphoneos-arm.deb $(package).deb | |
36 | sudo chown -R 0 _ | |
37 | sudo chgrp -R 0 _ | |
38 | dpkg-deb -b _ $(package).deb | |
39 | readlink $(package).deb |