-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
105 lines (79 loc) · 2.19 KB
/
Android.mk
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
93
94
95
96
97
98
99
100
101
102
103
104
105
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# measurements show that the ARM version of ZLib is about x1.17 faster
# than the thumb one...
LOCAL_ARM_MODE := arm
zlib_files := \
src/adler32.c \
src/compress.c \
src/crc32.c \
src/deflate.c \
src/gzclose.c \
src/gzlib.c \
src/gzread.c \
src/gzwrite.c \
src/infback.c \
src/inflate.c \
src/inftrees.c \
src/inffast.c \
src/trees.c \
src/uncompr.c \
src/zutil.c
zlib_cflags := -O3 -DUSE_MMAP -DZLIB_CONST
LOCAL_MODULE := libz
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += $(zlib_cflags)
# TODO: This is to work around b/24465209. Remove after root cause is fixed
LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
LOCAL_SRC_FILES := $(zlib_files)
LOCAL_CXX_STL := none
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libz
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += $(zlib_cflags)
LOCAL_SRC_FILES := $(zlib_files)
LOCAL_CXX_STL := none
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libz
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += $(zlib_cflags)
LOCAL_SRC_FILES := $(zlib_files)
LOCAL_MULTILIB := both
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_MODULE_HOST_OS := darwin linux windows
LOCAL_CXX_STL := none
include $(BUILD_HOST_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libz-host
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += $(zlib_cflags)
LOCAL_SRC_FILES := $(zlib_files)
LOCAL_MULTILIB := both
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_CXX_STL := none
include $(BUILD_HOST_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
src/test/minigzip.c
LOCAL_MODULE:= gzip
LOCAL_SHARED_LIBRARIES := libz
LOCAL_CXX_STL := none
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
src/test/minigzip.c
LOCAL_MODULE:= minigzip
LOCAL_STATIC_LIBRARIES := libz
LOCAL_CXX_STL := none
include $(BUILD_HOST_EXECUTABLE)
$(TARGET_OUT_COMMON_GEN)/zlib_fingerprint : $(wildcard $(LOCAL_PATH)/src/*.[ch])
printf '%s\n' $^ | LC_ALL=C sort | xargs cat | shasum -a 256 | \
awk '{printf $$1}' > $@
# Unset local variables
zlib_files:=
zlib_cflags:=