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 lib/xmlparse.c \ 8 lib/xmlrole.c \ 9 lib/xmltok.c 10 11 common_CFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H 12 13 common_C_INCLUDES += \ 14 $(LOCAL_PATH)/lib 15 16 common_COPY_HEADERS_TO := libexpat 17 common_COPY_HEADERS := \ 18 lib/expat.h \ 19 lib/expat_external.h 20 21 # For the host 22 # ===================================================== 23 24 include $(CLEAR_VARS) 25 26 LOCAL_SRC_FILES := $(common_SRC_FILES) 27 LOCAL_CFLAGS += $(common_CFLAGS) 28 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 29 30 ifeq ($(HOST_OS),darwin) 31 LOCAL_CFLAGS += -fno-common 32 endif 33 34 LOCAL_MODULE:= libexpat 35 LOCAL_MODULE_TAGS := optional 36 37 include $(BUILD_HOST_STATIC_LIBRARY) 38 39 40 include $(CLEAR_VARS) 41 42 LOCAL_SRC_FILES := $(common_SRC_FILES) 43 LOCAL_CFLAGS += $(common_CFLAGS) 44 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 45 46 ifeq ($(HOST_OS),darwin) 47 LOCAL_CFLAGS += -fno-common 48 endif 49 50 LOCAL_MODULE:= libexpat 51 LOCAL_MODULE_TAGS := optional 52 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) 53 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) 54 55 include $(BUILD_HOST_SHARED_LIBRARY) 56 57 58 # For the device 59 # ===================================================== 60 61 # Device static library 62 include $(CLEAR_VARS) 63 64 ifeq ($(TARGET_ARCH),arm) 65 LOCAL_NDK_VERSION := 4 66 LOCAL_SDK_VERSION := 8 67 endif 68 69 LOCAL_SRC_FILES := $(common_SRC_FILES) 70 LOCAL_CFLAGS += $(common_CFLAGS) 71 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 72 73 LOCAL_MODULE:= libexpat_static 74 LOCAL_MODULE_TAGS := optional 75 76 include $(BUILD_STATIC_LIBRARY) 77 78 # Device shared library 79 include $(CLEAR_VARS) 80 81 ifeq ($(TARGET_ARCH),arm) 82 LOCAL_NDK_VERSION := 4 83 LOCAL_SDK_VERSION := 8 84 endif 85 86 LOCAL_SRC_FILES := $(common_SRC_FILES) 87 LOCAL_CFLAGS += $(common_CFLAGS) 88 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 89 90 LOCAL_MODULE:= libexpat 91 LOCAL_MODULE_TAGS := optional 92 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) 93 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) 94 95 include $(BUILD_SHARED_LIBRARY) 96