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 # For the host 22 # ===================================================== 23 24 # Host static library 25 include $(CLEAR_VARS) 26 27 LOCAL_SRC_FILES := $(common_SRC_FILES) 28 LOCAL_CFLAGS += $(common_CFLAGS) 29 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 30 31 LOCAL_CFLAGS_darwin += -fno-common 32 33 LOCAL_MODULE:= libexpat 34 LOCAL_MODULE_HOST_OS := darwin linux windows 35 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/lib 36 37 LOCAL_MULTILIB := both 38 39 include $(BUILD_HOST_STATIC_LIBRARY) 40 41 # Host shared library 42 include $(CLEAR_VARS) 43 44 LOCAL_SRC_FILES := $(common_SRC_FILES) 45 LOCAL_CFLAGS += $(common_CFLAGS) 46 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 47 48 LOCAL_CFLAGS_darwin += -fno-common 49 50 LOCAL_MODULE:= libexpat-host 51 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/lib 52 LOCAL_MULTILIB := both 53 54 include $(BUILD_HOST_SHARED_LIBRARY) 55 56 57 # For the device 58 # ===================================================== 59 60 # Device static library 61 include $(CLEAR_VARS) 62 63 ifeq ($(TARGET_ARCH),arm) 64 LOCAL_SDK_VERSION := 8 65 else 66 LOCAL_SDK_VERSION := 9 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_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 75 LOCAL_MODULE_TAGS := optional 76 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/lib 77 78 include $(BUILD_STATIC_LIBRARY) 79 80 # Device shared library 81 include $(CLEAR_VARS) 82 83 ifeq ($(TARGET_ARCH),arm) 84 LOCAL_SDK_VERSION := 8 85 else 86 LOCAL_SDK_VERSION := 9 87 endif 88 89 LOCAL_SYSTEM_SHARED_LIBRARIES := libc 90 LOCAL_SRC_FILES := $(common_SRC_FILES) 91 LOCAL_CFLAGS += $(common_CFLAGS) 92 LOCAL_C_INCLUDES += $(common_C_INCLUDES) 93 94 LOCAL_MODULE:= libexpat 95 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 96 LOCAL_MODULE_TAGS := optional 97 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/lib 98 99 include $(BUILD_SHARED_LIBRARY) 100