LOCAL_PATH:= $(call my-dir) # We need to build this for both the device (as a shared library) # and the host (as a static library for tools to use). common_SRC_FILES := \ lib/xmlparse.c \ lib/xmlrole.c \ lib/xmltok.c common_CFLAGS := \ -Wall \ -Wmissing-prototypes -Wstrict-prototypes \ -Wno-unused-parameter -Wno-missing-field-initializers \ -fexceptions \ -DHAVE_EXPAT_CONFIG_H common_C_INCLUDES += \ $(LOCAL_PATH)/lib # For the host # ===================================================== # Host static library include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_SRC_FILES) LOCAL_CFLAGS += $(common_CFLAGS) LOCAL_C_INCLUDES += $(common_C_INCLUDES) LOCAL_CFLAGS_darwin += -fno-common LOCAL_MODULE:= libexpat LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/lib LOCAL_MULTILIB := both include $(BUILD_HOST_STATIC_LIBRARY) # Host shared library include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_SRC_FILES) LOCAL_CFLAGS += $(common_CFLAGS) LOCAL_C_INCLUDES += $(common_C_INCLUDES) LOCAL_CFLAGS_darwin += -fno-common LOCAL_MODULE:= libexpat-host LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/lib LOCAL_MULTILIB := both include $(BUILD_HOST_SHARED_LIBRARY) # For the device # ===================================================== # Device static library include $(CLEAR_VARS) ifeq ($(TARGET_ARCH),arm) LOCAL_SDK_VERSION := 8 else LOCAL_SDK_VERSION := 9 endif LOCAL_SRC_FILES := $(common_SRC_FILES) LOCAL_CFLAGS += $(common_CFLAGS) LOCAL_C_INCLUDES += $(common_C_INCLUDES) LOCAL_MODULE:= libexpat_static LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE_TAGS := optional LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/lib include $(BUILD_STATIC_LIBRARY) # Device shared library include $(CLEAR_VARS) ifeq ($(TARGET_ARCH),arm) LOCAL_SDK_VERSION := 8 else LOCAL_SDK_VERSION := 9 endif LOCAL_SYSTEM_SHARED_LIBRARIES := libc LOCAL_SRC_FILES := $(common_SRC_FILES) LOCAL_CFLAGS += $(common_CFLAGS) LOCAL_C_INCLUDES += $(common_C_INCLUDES) LOCAL_MODULE:= libexpat LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE_TAGS := optional LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/lib include $(BUILD_SHARED_LIBRARY)