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