summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhengyin Qian <qianzy@google.com>2015-08-14 11:11:14 -0700
committerBill Yi <byi@google.com>2015-08-26 15:06:13 -0700
commit06916c16ec28b5b9e719e410faffa090833b804a (patch)
tree47cab333c28d4164ed0d504a33f664504ed7625b
parente01aaac866fb8482759fc2dd273b67afa8a174df (diff)
downloadparameter-framework-06916c16ec28b5b9e719e410faffa090833b804a.tar.gz
stlport library is needed for versions of Android before M
Conditionally include it based on the Android version Change-Id: I4b17e3c0f61a6fd2b0b1e48ed1efe16e0a446dfc
-rw-r--r--Android.mk13
-rw-r--r--parameter/Android.mk5
-rw-r--r--remote-process/Android.mk3
-rw-r--r--remote-processor/Android.mk4
-rw-r--r--test/test-platform/Android.mk4
-rw-r--r--utility/Android.mk4
-rw-r--r--xmlserializer/Android.mk4
7 files changed, 37 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index f5f1064..60fb3bd 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,3 +1,16 @@
+# For Android L MR1 and lower, need to include libstlport
+# For M, this is not needed
+MAJOR_VERSION := $(shell echo $(PLATFORM_VERSION) | cut -f1 -d.)
+MINOR_VERSION := $(shell echo $(PLATFORM_VERSION) | cut -f2 -d.)
+
+ifeq ($(shell test $(MAJOR_VERSION) -le 4 && echo 1), 1)
+INCLUDE_STLPORT:=true
+else ifeq ($(shell test $(MAJOR_VERSION) -eq 5 -a $(MINOR_VERSION) -le 1 && echo 1), 1)
+INCLUDE_STLPORT:=true
+else
+INCLUDE_STLPORT:=false
+endif
+
# Recursive call sub-folder Android.mk
#
diff --git a/parameter/Android.mk b/parameter/Android.mk
index 3e0068d..86623be 100644
--- a/parameter/Android.mk
+++ b/parameter/Android.mk
@@ -160,6 +160,11 @@ LOCAL_STATIC_LIBRARIES := libxmlserializer libpfw_utility libxml2
LOCAL_REQUIRED_MODULES := libremote-processor
LOCAL_CLANG := false
+
+ifeq ($(INCLUDE_STLPORT), true)
+include external/stlport/libstlport.mk
+endif
+
include $(BUILD_SHARED_LIBRARY)
##############################
diff --git a/remote-process/Android.mk b/remote-process/Android.mk
index 53d3ae6..a29b834 100644
--- a/remote-process/Android.mk
+++ b/remote-process/Android.mk
@@ -67,6 +67,9 @@ LOCAL_C_INCLUDES := $(common_c_includes)
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
+ifeq ($(INCLUDE_STLPORT), true)
+include external/stlport/libstlport.mk
+endif
include $(BUILD_EXECUTABLE)
diff --git a/remote-processor/Android.mk b/remote-processor/Android.mk
index b8050b1..61e1f22 100644
--- a/remote-processor/Android.mk
+++ b/remote-processor/Android.mk
@@ -67,6 +67,10 @@ LOCAL_MODULE := $(common_module)
LOCAL_MODULE_OWNER := intel
LOCAL_MODULE_TAGS := $(common_module_tags)
+ifeq ($(INCLUDE_STLPORT), true)
+include external/stlport/libstlport.mk
+endif
+
include $(BUILD_SHARED_LIBRARY)
##############################
diff --git a/test/test-platform/Android.mk b/test/test-platform/Android.mk
index e46ad57..a96c8c3 100644
--- a/test/test-platform/Android.mk
+++ b/test/test-platform/Android.mk
@@ -63,6 +63,10 @@ LOCAL_LDLIBS := $(common_ldlibs)
LOCAL_STATIC_LIBRARIES := libpfw_utility
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
+ifeq ($(INCLUDE_STLPORT), true)
+include external/stlport/libstlport.mk
+endif
+
include $(BUILD_EXECUTABLE)
##############################
diff --git a/utility/Android.mk b/utility/Android.mk
index 09f3de7..25a99a7 100644
--- a/utility/Android.mk
+++ b/utility/Android.mk
@@ -60,6 +60,10 @@ LOCAL_MODULE_TAGS := $(common_module_tags)
LOCAL_CFLAGS := $(common_cflags)
+ifeq ($(INCLUDE_STLPORT), true)
+include external/stlport/libstlport.mk
+endif
+
include $(BUILD_STATIC_LIBRARY)
##############################
diff --git a/xmlserializer/Android.mk b/xmlserializer/Android.mk
index 1308c70..0f84ece 100644
--- a/xmlserializer/Android.mk
+++ b/xmlserializer/Android.mk
@@ -79,6 +79,10 @@ LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
+ifeq ($(INCLUDE_STLPORT), true)
+include external/stlport/libstlport.mk
+endif
+
include $(BUILD_STATIC_LIBRARY)
##############################