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/19059885. Remove after root cause is fixed 30LOCAL_LDFLAGS_arm := -Wl,--hash-style=both 31 32LOCAL_SRC_FILES := $(zlib_files) 33ifneq ($(TARGET_BUILD_APPS),) 34ifeq ($(TARGET_ARCH),arm) 35 LOCAL_SDK_VERSION := 9 36endif 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),) 49ifeq ($(TARGET_ARCH),arm) 50 LOCAL_SDK_VERSION := 9 51endif 52endif 53LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 54include $(BUILD_STATIC_LIBRARY) 55 56include $(CLEAR_VARS) 57 58LOCAL_ARM_MODE := arm 59LOCAL_MODULE := libz 60LOCAL_MODULE_TAGS := optional 61LOCAL_CFLAGS += -O3 -DUSE_MMAP 62LOCAL_SRC_FILES := $(zlib_files) 63LOCAL_MULTILIB := both 64LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 65include $(BUILD_HOST_STATIC_LIBRARY) 66 67include $(CLEAR_VARS) 68 69LOCAL_ARM_MODE := arm 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) 76include $(BUILD_HOST_SHARED_LIBRARY) 77 78include $(CLEAR_VARS) 79 80LOCAL_SRC_FILES:= \ 81 src/test/minigzip.c 82 83LOCAL_MODULE:= gzip 84 85LOCAL_SHARED_LIBRARIES := libz 86 87include $(BUILD_EXECUTABLE) 88 89include $(CLEAR_VARS) 90 91LOCAL_SRC_FILES:= \ 92 src/test/minigzip.c 93 94LOCAL_MODULE:= minigzip 95 96LOCAL_STATIC_LIBRARIES := libz 97 98include $(BUILD_HOST_EXECUTABLE) 99