]> git.saurik.com Git - uikittools.git/blob - makefile
7ba5ac8a88e8618cbef8e652ae50b34f09d713d0
[uikittools.git] / makefile
1 uikittools = uiduid uicache uiopen gssc sbdidlaunch sbreload cfversion iomfsetgamma libuicache.dylib
2
3 all: $(uikittools)
4
5 clean:
6 rm -f $(uikittools) extrainst_
7
8 .PHONY: all clean package
9
10 cfversion := -framework CoreFoundation
11 gssc := -framework CoreFoundation
12 sbdidlaunch := -framework CoreFoundation -framework SpringBoardServices
13 uicache := -framework Foundation -framework UIKit # XXX: UIKit -> MobileCoreServices
14 uiduid := -framework Foundation -framework UIKit
15 uiopen := -framework Foundation -framework UIKit
16 uishoot := -framework CoreFoundation -framework Foundation -framework UIKit
17 extrainst_ := -framework CoreFoundation -framework Foundation
18
19 uicache: csstore.cpp
20 extrainst_: csstore.cpp
21
22 %.dylib: %.mm
23 $${PKG_TARG}-g++ -Wall -Werror -dynamiclib -o $@ $^ $($@) -F"$${PKG_ROOT}"/System/Library/PrivateFrameworks -lobjc -framework CoreFoundation -framework Foundation
24 ldid -S $@
25
26 %: %.mm
27 $${PKG_TARG}-g++ -Wall -Werror -o $@ $^ $($@) -F"$${PKG_ROOT}"/System/Library/PrivateFrameworks -lobjc
28 ldid -S$(wildcard $@.xml) $@
29
30 %: %.c
31 $${PKG_TARG}-gcc -Wall -Werror -o $@ $< -framework CoreFoundation
32 ldid -S$(wildcard $@.xml) $@
33
34 iomfsetgamma: iomfsetgamma.c
35 $${PKG_TARG}-gcc -Wall -Werror -o $@ $< -F"$${PKG_ROOT}"/System/Library/PrivateFrameworks -framework IOKit -framework IOMobileFramebuffer
36 ldid -S$(wildcard $@.xml) $@
37
38 package: all extrainst_
39 rm -rf _
40 mkdir -p _/usr/lib
41 cp -a $(filter %.dylib,$(uikittools)) _/usr/lib
42 mkdir -p _/usr/bin
43 cp -a $(filter-out %.dylib,$(uikittools)) _/usr/bin
44 mkdir -p _/DEBIAN
45 ./control.sh _ >_/DEBIAN/control
46 cp -a extrainst_ _/DEBIAN/
47 mkdir -p debs
48 ln -sf debs/uikittools_$$(./version.sh)_iphoneos-arm.deb uikittools.deb
49 dpkg-deb -b _ uikittools.deb
50 readlink uikittools.deb