-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.WatchOS64
executable file
·69 lines (55 loc) · 1.9 KB
/
Makefile.WatchOS64
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
##
#
# AnV LZVN/LZSS kernel cache decompressor V1.0
#
# WatchOS 64-bit (ARM64_32) version
#
##
PREFIX=/usr/local
LIBPREFIX=iOS
XCODEPATH=/Applications/Xcode.app
PLATFORM=WatchOS.platform
SDK=WatchOS.sdk
SDKPREFIX=$(XCODEPATH)/Contents/Developer/Platforms/$(PLATFORM)/Developer/SDKs/$(SDK)
NASM=nasm
CC=clang -I$(LIBPREFIX)/include -F$(SDKPREFIX)/System/Library/Frameworks -I$(SDKPREFIX)/usr/include
AR=ar
RANLIB=ranlib
YACC=/usr/bin/bison -y
CODESIGN=codesign
CSIDENT=-
LIBS=-nostdlib -L. -llzvn -F$(SDKPREFIX)/System/Library/Frameworks -L$(SDKPREFIX)/usr/lib -framework CoreFoundation -lSystem
INSTALL=install
ARFLAGS=cru
CFLAGS=-arch arm64_32 -Os -mwatchos-version-min=6.0 -isysroot $(XCODEPATH)/Contents/Developer/Platforms/$(PLATFORM)/Developer/SDKs/$(SDK)
ASFLAGS=$(CFLAGS)
all: decompkernelcache decompkernelcache-kc
# .asm.o:
# $(NASM) -o $@ -f macho64 $<
# .s.o:
# $(CC) $(ASFLAGS) -c $< -o $@
# .S.o:
# $(CC) $(ASFLAGS) -c $< -o $@
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
#IOCFUnserialize.c: IOCFUnserialize.yacc
# $(YACC) -o $@ $<
WINSUPSRC/IOCFUnserialize.o: WINSUPSRC/IOCFUnserialize.c
lzvndec.o: lzvndec.c
lzvn_encode.o: lzvn_encode.c
liblzvn.a: lzvndec.o lzvn_encode.o
$(AR) $(ARFLAGS) $@ lzvndec.o lzvn_encode.o
$(RANLIB) liblzvn.a
decompkernelcache: decompkernelcache.o WINSUPSRC/IOCFUnserialize.o liblzvn.a
$(CC) $(CFLAGS) -o $@ decompkernelcache.o WINSUPSRC/IOCFUnserialize.o $(LIBS)
$(CODESIGN) -s "$(CSIDENT)" $@
decompkernelcache-kc: decompkernelcache-kc.o WINSUPSRC/IOCFUnserialize.o liblzvn.a
$(CC) $(CFLAGS) -o $@ decompkernelcache-kc.o WINSUPSRC/IOCFUnserialize.o $(LIBS)
$(CODESIGN) -s "$(CSIDENT)" $@
clean:
rm -f *.o WINSUPSRC/IOCFUnserialize.o liblzvn.a decompkernelcache decompkernelcache-kc
install: decompkernelcache lzvn.h liblzvn.a
$(INSTALL) decompkernelcache $(PREFIX)/bin
$(INSTALL) decompkernelcache-kc $(PREFIX)/bin
$(INSTALL) liblzvn.a $(PREFIX)/lib
$(INSTALL) lzvn.h $(PREFIX)/include