From 9e69aed1debb455259cf5e2d959684b35bbe1ee6 Mon Sep 17 00:00:00 2001 From: Kevin Rocard Date: Tue, 9 Jun 2015 20:42:27 +0200 Subject: [PATCH] Android: Make libxmserializer dynamic The Paramter Framework has recently removed its *_include libraries (this trick was not working on osx). They were used to include headers without linking against the libraries in the android build system. There are two ways to include library headers: - copy the headers (but that would be in contradiction with how the main pfw headers are included) - link against the library (chosen solution) In order for the plugins to avoid linking against a static libxmlserializer - ie add it and it's dependency to all plugins - the xmlserializer library is now dynamic. Change-Id: I79feb434c7b44ad4473d62276efc3c4b77928894 --- bindings/python/Android.mk | 3 +-- parameter/Android.mk | 11 ++++------- xmlserializer/Android.mk | 4 ++-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/bindings/python/Android.mk b/bindings/python/Android.mk index d1ba0f159..81af2c194 100644 --- a/bindings/python/Android.mk +++ b/bindings/python/Android.mk @@ -44,8 +44,7 @@ LOCAL_CLANG := false # Android only provides a 32bit version of python. LOCAL_32_BIT_ONLY := true -LOCAL_SHARED_LIBRARIES := libparameter_host -LOCAL_STATIC_LIBRARIES := libxmlserializer_host +LOCAL_SHARED_LIBRARIES := libxmlserializer_host libparameter_host # python is only available in 32bits for now, thus arch is forced to 32bits PYTHON_INSTALL_PATH := prebuilts/python/$(HOST_OS)-x86/2.7.5/ diff --git a/parameter/Android.mk b/parameter/Android.mk index aa1e802b4..95674a1ee 100644 --- a/parameter/Android.mk +++ b/parameter/Android.mk @@ -130,11 +130,8 @@ common_cflags := \ common_c_includes := \ $(LOCAL_PATH)/include/ \ $(LOCAL_PATH)/../utility/ \ - $(LOCAL_PATH)/../xmlserializer/ \ $(LOCAL_PATH)/../remote-processor/ -common_shared_libraries := libicuuc - ############################# # Target build @@ -155,8 +152,8 @@ LOCAL_MODULE_TAGS := $(common_module_tags) LOCAL_C_INCLUDES := $(common_c_includes) -LOCAL_SHARED_LIBRARIES := $(common_shared_libraries) libdl -LOCAL_STATIC_LIBRARIES := libxmlserializer libpfw_utility libxml2 +LOCAL_SHARED_LIBRARIES := libxmlserializer libdl +LOCAL_STATIC_LIBRARIES := libpfw_utility LOCAL_REQUIRED_MODULES := libremote-processor @@ -184,8 +181,8 @@ LOCAL_MODULE_TAGS := $(common_module_tags) LOCAL_C_INCLUDES += \ $(common_c_includes) -LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)-host -LOCAL_STATIC_LIBRARIES := libxmlserializer_host libpfw_utility_host libxml2 +LOCAL_SHARED_LIBRARIES := libxmlserializer_host +LOCAL_STATIC_LIBRARIES := libpfw_utility_host libxml2 LOCAL_LDLIBS += -ldl diff --git a/xmlserializer/Android.mk b/xmlserializer/Android.mk index de32991f0..19acc81f7 100644 --- a/xmlserializer/Android.mk +++ b/xmlserializer/Android.mk @@ -79,7 +79,7 @@ LOCAL_STATIC_LIBRARIES := $(common_static_libraries) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) include external/stlport/libstlport.mk -include $(BUILD_STATIC_LIBRARY) +include $(BUILD_SHARED_LIBRARY) ############################## # Host build @@ -103,5 +103,5 @@ LOCAL_STATIC_LIBRARIES := libxml2 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) -include $(BUILD_HOST_STATIC_LIBRARY) +include $(BUILD_HOST_SHARED_LIBRARY)