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