summaryrefslogtreecommitdiffstats
path: root/xmlserializer
diff options
context:
space:
mode:
authorKevin Rocard <kevinx.rocard@intel.com>2013-05-07 17:29:53 +0200
committerDavid Wagner <david.wagner@intel.com>2014-02-12 17:03:53 +0100
commit9ba0c563e48497f2f1c100c6fdb6759b882da551 (patch)
tree93fdb661296081522f9899fabeed805da1212eb6 /xmlserializer
parent6ac99e5d2314f6629849954f22f54e7b22226efb (diff)
downloadexternal_parameter-framework-9ba0c563e48497f2f1c100c6fdb6759b882da551.zip
external_parameter-framework-9ba0c563e48497f2f1c100c6fdb6759b882da551.tar.gz
external_parameter-framework-9ba0c563e48497f2f1c100c6fdb6759b882da551.tar.bz2
[xml serializer] Add support for host build
BZ: 107991 In order to generate setting xml at build time, one need to build and run PFW environement on host. Add an host compilation target. Change-Id: I0684b40c9264f18c573d646857afded6c0d4e376 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/107268 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'xmlserializer')
-rw-r--r--xmlserializer/Android.mk71
1 files changed, 53 insertions, 18 deletions
diff --git a/xmlserializer/Android.mk b/xmlserializer/Android.mk
index d4dfda3..682f1d5 100644
--- a/xmlserializer/Android.mk
+++ b/xmlserializer/Android.mk
@@ -1,10 +1,9 @@
LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
+####################
+# Common definitions
-LOCAL_SRC_FILES := \
+COMMON_SRC_FILES := \
XmlElement.cpp \
XmlSerializingContext.cpp \
XmlDocSource.cpp \
@@ -15,28 +14,64 @@ LOCAL_SRC_FILES := \
XmlFileDocSink.cpp \
XmlFileDocSource.cpp
-LOCAL_MODULE := libxmlserializer
+COMMON_MODULE := libxmlserializer
-LOCAL_MODULE_TAGS := optional
+COMMON_MODULE_TAGS := optional
-TARGET_ERROR_FLAGS += -Wno-non-virtual-dtor
+COMMON_ERROR_FLAGS := -Wno-non-virtual-dtor
-LOCAL_C_INCLUDES +=
+COMMON_C_INCLUDES := \
+ external/libxml2/include/ \
+ external/webkit/Source/WebCore/icu/ \
-LOCAL_C_INCLUDES += \
- external/stlport/stlport/ \
- external/libxml2/include/ \
- external/webkit/Source/WebCore/icu/ \
- bionic/libstdc++ \
- bionic/
+COMMON_SHARED_LIBRARIES := libicuuc
+COMMON_STATIC_LIBRARIES := libxml2
+
+COMMON_LDLIBS := -Lexternal/libxml2/lib
+
+#############################
+# Target build
-LOCAL_C_INCLUDES +=
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(COMMON_SRC_FILES)
+
+LOCAL_MODULE := $(COMMON_MODULE)
+LOCAL_MODULE_TAGS := $(COMMON_MODULE_TAGS)
-LOCAL_SHARED_LIBRARIES := libstlport libicuuc
-LOCAL_STATIC_LIBRARIES := libxml2
+TARGET_ERROR_FLAGS += $(COMMON_ERROR_FLAGS)
+
+LOCAL_C_INCLUDES += \
+ $(COMMON_C_INCLUDES) \
+ external/stlport/stlport/ \
+ bionic/libstdc++ \
+ bionic/
-LOCAL_LDLIBS += -Lexternal/libxml2/lib
+LOCAL_SHARED_LIBRARIES := $(COMMON_SHARED_LIBRARIES) libstlport
+LOCAL_STATIC_LIBRARIES := $(COMMON_STATIC_LIBRARIES)
+LOCAL_LDLIBS += $(COMMON_LDLIBS)
include $(BUILD_SHARED_LIBRARY)
+##############################
+# Host build
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(COMMON_SRC_FILES)
+
+LOCAL_MODULE := $(COMMON_MODULE)
+LOCAL_MODULE_TAGS := $(COMMON_MODULE_TAGS)
+
+TARGET_ERROR_FLAGS += $(COMMON_ERROR_FLAGS)
+
+LOCAL_C_INCLUDES += \
+ $(COMMON_C_INCLUDES)
+
+LOCAL_SHARED_LIBRARIES := $(COMMON_SHARED_LIBRARIES)
+LOCAL_STATIC_LIBRARIES := $(COMMON_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += $(COMMON_LDLIBS)
+
+include $(BUILD_HOST_SHARED_LIBRARY)