1LOCAL_PATH:= $(call my-dir) 2 3# We need to build this for both the device (as a shared library) 4# and the host (as a static library for tools to use). 5 6common_SRC_FILES := \ 7 png.c \ 8 pngerror.c \ 9 pnggccrd.c \ 10 pngget.c \ 11 pngmem.c \ 12 pngpread.c \ 13 pngread.c \ 14 pngrio.c \ 15 pngrtran.c \ 16 pngrutil.c \ 17 pngset.c \ 18 pngtrans.c \ 19 pngvcrd.c \ 20 pngwio.c \ 21 pngwrite.c \ 22 pngwtran.c \ 23 pngwutil.c 24 25common_CFLAGS := ## -fomit-frame-pointer 26 27common_C_INCLUDES += \ 28 29common_COPY_HEADERS_TO := libpng 30common_COPY_HEADERS := png.h pngconf.h pngusr.h 31 32# For the host 33# ===================================================== 34 35include $(CLEAR_VARS) 36 37LOCAL_SRC_FILES := $(common_SRC_FILES) 38LOCAL_CFLAGS += $(common_CFLAGS) 39LOCAL_C_INCLUDES += $(common_C_INCLUDES) external/zlib 40 41LOCAL_MODULE:= libpng 42 43LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) 44LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) 45 46include $(BUILD_HOST_STATIC_LIBRARY) 47 48 49# For the device 50# ===================================================== 51 52include $(CLEAR_VARS) 53 54LOCAL_SRC_FILES := $(common_SRC_FILES) 55LOCAL_CFLAGS += $(common_CFLAGS) 56LOCAL_C_INCLUDES += $(common_C_INCLUDES) \ 57 external/zlib 58LOCAL_SHARED_LIBRARIES := \ 59 libz 60 61LOCAL_MODULE:= libpng 62 63LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) 64LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) 65 66include $(BUILD_STATIC_LIBRARY) 67 68 69