forked from shakalaca/adb-win64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.zipalign
93 lines (74 loc) · 2.59 KB
/
makefile.zipalign
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# zipalign makefile
# ------------
#TODO change TOOLCHAIN variable to your toolchain path
TOOLCHAIN= /usr/bin/x86_64-w64-mingw32-
CC= $(TOOLCHAIN)gcc
LD= $(TOOLCHAIN)gcc
CXX=$(CC)
LOCAL_PATH:= $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
adb_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android
SRCS+= ZipAlign.c
SRCS+= ZipEntry.c
SRCS+= ZipFile.c
VPATH+= ../../../../system/core/liblog/
SRCS+= fake_log_device.c
SRCS+= logger_write.c
SRCS+= config_write.c
SRCS+= logger_lock.c
SRCS+= fake_writer.c
SRCS+= logger_name.c
VPATH+= ../../../../system/core/libziparchive/
SRCS+= zip_archive.c
VPATH+= ../../../../system/core/base/
SRCS+= file.c
SRCS+= utf8.c
SRCS+= logging.c
SRCS+= strings.c
VPATH+= ../../../../system/core/libutils/
SRCS+= VectorImpl.c
SRCS+= FileMap.c
SRCS+= SharedBuffer.c
SRCS+= ../../../../external/zopfli/src/zopfli/blocksplitter.c
SRCS+= ../../../../external/zopfli/src/zopfli/lz77.c
SRCS+= ../../../../external/zopfli/src/zopfli/squeeze.c
SRCS+= ../../../../external/zopfli/src/zopfli/tree.c
SRCS+= ../../../../external/zopfli/src/zopfli/util.c
SRCS+= ../../../../external/zopfli/src/zopfli/katajainen.c
SRCS+= ../../../../external/zopfli/src/zopfli/hash.c
SRCS+= ../../../../external/zopfli/src/zopfli/deflate.c
SRCS+= ../../../../external/zopfli/src/zopfli/cache.c
VPATH+= ../../../../external/safe-iop/src/
SRCS+= safe_iop.c
VPATH+= ../../../../platform/frameworks/base/libs/androidfw/
SRCS+= ZipUtils.c
SRCS+= ZipFileRO.c
SRCS+= ../../../../external/zlib/src/adler32.c
SRCS+= ../../../../external/zlib/src/compress.c
SRCS+= ../../../../external/zlib/src/crc32.c
SRCS+= ../../../../external/zlib/src/deflate.c
SRCS+= ../../../../external/zlib/src/infback.c
SRCS+= ../../../../external/zlib/src/inffast.c
SRCS+= ../../../../external/zlib/src/inflate.c
SRCS+= ../../../../external/zlib/src/inftrees.c
SRCS+= ../../../../external/zlib/src/trees.c
SRCS+= ../../../../external/zlib/src/uncompr.c
SRCS+= ../../../../external/zlib/src/zutil.c
CXXFLAGS+= -std=gnu++11
CPPFLAGS+= -I.
CPPFLAGS+= -I../../../../external/zlib
CPPFLAGS+= -I../../../../external/safe-iop/include/
CPPFLAGS+= -I../../../../external/zopfli/src/
CPPFLAGS+= -I../../../../system/core/include/
CPPFLAGS+= -I../../../../system/core/base/include/
CPPFLAGS+= -I../../../../platform/frameworks/base/include/
CPPFLAGS+= -D__STDC_FORMAT_MACROS
CPPFLAGS+= -Du_int32_t=uint32_t
CPPFLAGS+= -DFAKE_LOG_DEVICE=1
CFLAGS+= -O2 -g -Wall -Wno-unused-parameter
LIBS+= -static -lstdc++
OBJS= $(SRCS:.c=.o)
all: zipalign.exe
zipalign.exe: $(OBJS)
$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
clean:
rm -rf $(OBJS)