1 LOCAL_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 6 common_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 25 common_CFLAGS := ## -fomit-frame-pointer 26 27 common_C_INCLUDES += \ 28 29 common_COPY_HEADERS_TO := libpng 30 common_COPY_HEADERS := png.h pngconf.h pngusr.h 31 32 # For the host 33 # ===================================================== 34 35 include $(CLEAR_VARS) 36 37 LOCAL_SRC_FILES := $(common_SRC_FILES) 38 LOCAL_CFLAGS += $(common_CFLAGS) 39 LOCAL_C_INCLUDES += $(common_C_INCLUDES) external/zlib 40 41 LOCAL_MODULE:= libpng 42 43 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) 44 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) 45 46 include $(BUILD_HOST_STATIC_LIBRARY) 47 48 49 # For the device 50 # ===================================================== 51 52 include $(CLEAR_VARS) 53 54 LOCAL_SRC_FILES := $(common_SRC_FILES) 55 LOCAL_CFLAGS += $(common_CFLAGS) 56 LOCAL_C_INCLUDES += $(common_C_INCLUDES) \ 57 external/zlib 58 LOCAL_SHARED_LIBRARIES := \ 59 libz 60 61 LOCAL_MODULE:= libpng 62 63 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) 64 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) 65 66 include $(BUILD_STATIC_LIBRARY) 67 68 69