-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.android_i686
executable file
·68 lines (54 loc) · 2.09 KB
/
Makefile.android_i686
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
##
#
# AnV LZVN/LZSS kernel cache decompressor V1.0
#
# Android version (I686)
#
##
PREFIX=/usr/local
LIBPREFIX=AndroidI686
CPU=$(shell uname -m)
PLATFORM=linux
ANDROID_CPU=i686
ANDROID_VERSION=31
ANDROID_NDK_PATH=/usr/local/android-studio/plugins/android-ndk
ANDROID_TOOLCHAIN_DIR=$(ANDROID_NDK_PATH)/toolchains/llvm/prebuilt/$(PLATFORM)-$(CPU)/bin
SYSROOT_DIR=$(ANDROID_NDK_PATH)/toolchains/llvm/prebuilt/$(PLATFORM)-$(CPU)/sysroot/usr
NASM=nasm
CC=$(ANDROID_TOOLCHAIN_DIR)/i686-linux-android$(ANDROID_VERSION)-clang -I$(SYSROOT_DIR)/include -I$(SYSROOT_DIR)/include/$(ANDROID_CPU)-linux-android -I$(LIBPREFIX)/include
YACC=$(LIBPREFIX)/bin/bison -y
AR=$(ANDROID_TOOLCHAIN_DIR)/llvm-ar
RANLIB=$(ANDROID_TOOLCHAIN_DIR)/llvm-ranlib
LIBS=-L. -llzvn -L"$(LIBPREFIX)/lib" -L"$(SYSROOT_DIR)/lib/$(ANDROID_CPU)-linux-android/$(ANDROID_VERSION)" -lCoreFoundation -licuuc -licudata -licui18n -lBlocksRuntime -ldispatch -lstdc++ -lkqueue -lc -lm -lcompiler_rt-extras
INSTALL=install
ARFLAGS=cru
CFLAGS=-Os
ASFLAGS=$(CFLAGS)
all: decompkernelcache
# .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 $@ $<
lzvndec.o: lzvndec.c
lzvn_encode.o: lzvn_encode.c
WINSUPSRC/IOCFUnserialize.o: WINSUPSRC/IOCFUnserialize.c
liblzvn.a: lzvndec.o lzvn_encode.o
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) liblzvn.a
decompkernelcache: decompkernelcache.o WINSUPSRC/IOCFUnserialize.o liblzvn.a
$(CC) $(CFLAGS) -o $@ decompkernelcache.o WINSUPSRC/IOCFUnserialize.o $(LIBS)
decompkernelcache-kc: decompkernelcache-kc.o WINSUPSRC/IOCFUnserialize.o liblzvn.a
$(CC) $(CFLAGS) -o $@ decompkernelcache-kc.o WINSUPSRC/IOCFUnserialize.o $(LIBS)
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