forked from faywong/veency
-
Notifications
You must be signed in to change notification settings - Fork 35
/
tweak.mk.fw
34 lines (25 loc) · 1.13 KB
/
tweak.mk.fw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ifndef base
base := ..
endif
target := arm-apple-darwin9-
link := -framework CoreFoundation -framework Foundation -F${PKG_ROOT}/System/Library/PrivateFrameworks -L/home/faywong/menes/substrate -lsubstrate
all: $(name).dylib $(control)
clean:
rm -f $(name).dylib
$(name).dylib: Tweak.mm makefile
$(target)g++ -dynamiclib -g0 -O2 -Wall -Werror -o $@ $(filter %.mm,$^) -lobjc -I/home/faywong/menes/substrate $(link) $(flags)
ldid -S $@
package: all
rm -rf package
mkdir -p package/DEBIAN
mkdir -p package/Library/MobileSubstrate/DynamicLibraries
cp -a control $(control) package/DEBIAN
if [ -e Tweak.plist ]; then cp -a Tweak.plist package/Library/MobileSubstrate/DynamicLibraries/$(name).plist; fi
if [ -e PreferenceLoader ]; then cp -rfp PreferenceLoader package/Library/; fi
$(MAKE) extra
cp -a $(name).dylib package/Library/MobileSubstrate/DynamicLibraries
dpkg-deb -b package $(shell grep ^Package: control | cut -d ' ' -f 2-)_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb
extra:
%: %.mm
$(target)g++ -o $@ -Wall -Werror $< -lobjc -framework CoreFoundation -framework Foundation
.PHONY: all clean extra package