diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-07-27 01:06:28 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-07-27 01:06:28 +0000 |
commit | d8f5715de175a68a8bf5a68301e6d6e3cc702429 (patch) | |
tree | a2366d8145669e267e8b0c753e88c0d50c0ae94a | |
parent | 67c9aa8ef11ff94559743a2905cbe091b78f713c (diff) | |
parent | 12bddbf2b12be35a77daba2a35a4671f84a5c230 (diff) |
Merge \\"Convert Android.mk to Android.bp\\" am: 918dd43a5b
am: 12bddbf2b1
Change-Id: I2a65633bc979a0ca0798e79d1148d308d5209719
-rw-r--r-- | Android.bp | 37 | ||||
-rw-r--r-- | Android.mk | 99 |
2 files changed, 37 insertions, 99 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..f2a6165 --- /dev/null +++ b/Android.bp @@ -0,0 +1,37 @@ +// We need to build this for both the device (as a shared library) +// and the host (as a static library for tools to use). + +cc_library { + name: "libexpat", + host_supported: true, + unique_host_soname: true, + sdk_version: "9", + + srcs: [ + "lib/xmlparse.c", + "lib/xmlrole.c", + "lib/xmltok.c", + ], + cflags: [ + "-Wall", + "-Wmissing-prototypes", + "-Wstrict-prototypes", + "-Wno-unused-parameter", + "-Wno-missing-field-initializers", + "-fexceptions", + "-DHAVE_EXPAT_CONFIG_H", + ], + + target: { + darwin: { + cflags: ["-fno-common"], + }, + + windows: { + enabled: true, + }, + }, + + local_include_dirs: ["lib"], + export_include_dirs: ["lib"], +} diff --git a/Android.mk b/Android.mk deleted file mode 100644 index cb4025a..0000000 --- a/Android.mk +++ /dev/null @@ -1,99 +0,0 @@ -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) |