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