1LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4# measurements show that the ARM version of ZLib is about x1.17 faster
5# than the thumb one...
6LOCAL_ARM_MODE := arm
7
8zlib_files := \
9	src/adler32.c \
10	src/compress.c \
11	src/crc32.c \
12	src/deflate.c \
13	src/gzclose.c \
14	src/gzlib.c \
15	src/gzread.c \
16	src/gzwrite.c \
17	src/infback.c \
18	src/inflate.c \
19	src/inftrees.c \
20	src/inffast.c \
21	src/trees.c \
22	src/uncompr.c \
23	src/zutil.c
24
25LOCAL_MODULE := libz
26LOCAL_MODULE_TAGS := optional
27LOCAL_CFLAGS += -O3 -DUSE_MMAP
28
29# TODO: This is to work around b/24465209. Remove after root cause is fixed
30LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
31
32LOCAL_SRC_FILES := $(zlib_files)
33ifneq ($(TARGET_BUILD_APPS),)
34  LOCAL_SDK_VERSION := 9
35else
36  LOCAL_CXX_STL := none
37endif
38LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
39include $(BUILD_SHARED_LIBRARY)
40
41include $(CLEAR_VARS)
42
43LOCAL_ARM_MODE := arm
44LOCAL_MODULE := libz
45LOCAL_MODULE_TAGS := optional
46LOCAL_CFLAGS += -O3 -DUSE_MMAP
47LOCAL_SRC_FILES := $(zlib_files)
48ifneq ($(TARGET_BUILD_APPS),)
49  LOCAL_SDK_VERSION := 9
50else
51  LOCAL_CXX_STL := none
52endif
53LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
54include $(BUILD_STATIC_LIBRARY)
55
56include $(CLEAR_VARS)
57
58LOCAL_MODULE := libz
59LOCAL_MODULE_TAGS := optional
60LOCAL_CFLAGS += -O3 -DUSE_MMAP
61LOCAL_SRC_FILES := $(zlib_files)
62LOCAL_MULTILIB := both
63LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
64LOCAL_MODULE_HOST_OS := darwin linux windows
65LOCAL_CXX_STL := none
66include $(BUILD_HOST_STATIC_LIBRARY)
67
68include $(CLEAR_VARS)
69
70LOCAL_MODULE := libz-host
71LOCAL_MODULE_TAGS := optional
72LOCAL_CFLAGS += -O3 -DUSE_MMAP
73LOCAL_SRC_FILES := $(zlib_files)
74LOCAL_MULTILIB := both
75LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
76LOCAL_CXX_STL := none
77include $(BUILD_HOST_SHARED_LIBRARY)
78
79include $(CLEAR_VARS)
80
81LOCAL_SRC_FILES:=        \
82	src/test/minigzip.c
83
84LOCAL_MODULE:= gzip
85
86LOCAL_SHARED_LIBRARIES := libz
87
88LOCAL_CXX_STL := none
89
90include $(BUILD_EXECUTABLE)
91
92include $(CLEAR_VARS)
93
94LOCAL_SRC_FILES:=        \
95	src/test/minigzip.c
96
97LOCAL_MODULE:= minigzip
98
99LOCAL_STATIC_LIBRARIES := libz
100
101LOCAL_CXX_STL := none
102
103include $(BUILD_HOST_EXECUTABLE)
104