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