aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/targets/dri/Android.mk10
-rw-r--r--src/intel/Android.common.mk12
-rw-r--r--src/intel/Android.vulkan.mk11
-rw-r--r--src/mesa/drivers/dri/Android.mk10
-rw-r--r--src/util/Android.mk6
5 files changed, 45 insertions, 4 deletions
diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk
index 7638a67b26f..6134251b5ca 100644
--- a/src/gallium/targets/dri/Android.mk
+++ b/src/gallium/targets/dri/Android.mk
@@ -42,9 +42,17 @@ LOCAL_LDFLAGS := \
LOCAL_SHARED_LIBRARIES := \
libdl \
libglapi \
- libexpat \
libz
+# If Android version >=8 MESA should static link libexpat else should dynamic link
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
+LOCAL_STATIC_LIBRARIES := \
+ libexpat
+else
+LOCAL_SHARED_LIBRARIES += \
+ libexpat
+endif
+
ifeq ($(USE_LIBBACKTRACE),true)
LOCAL_SHARED_LIBRARIES += libbacktrace
endif
diff --git a/src/intel/Android.common.mk b/src/intel/Android.common.mk
index faec6b3ea4e..79d9f1284a0 100644
--- a/src/intel/Android.common.mk
+++ b/src/intel/Android.common.mk
@@ -38,7 +38,17 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mapi \
$(MESA_TOP)/src/mesa
-LOCAL_SHARED_LIBRARIES := libexpat libz liblog
+LOCAL_SHARED_LIBRARIES := libz liblog
+
+# If Android version >=8 MESA should static link libexpat else should dynamic link
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
+LOCAL_STATIC_LIBRARIES := \
+ libexpat
+else
+LOCAL_SHARED_LIBRARIES += \
+ libexpat
+endif
+
LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
index f38decbf308..05922afdbe0 100644
--- a/src/intel/Android.vulkan.mk
+++ b/src/intel/Android.vulkan.mk
@@ -337,8 +337,17 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
libmesa_intel_compiler \
libmesa_anv_entrypoints
-LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libexpat libz libsync liblog
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libz libsync liblog
LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES)
+# If Android version >=8 MESA should static link libexpat else should dynamic link
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
+LOCAL_STATIC_LIBRARIES := \
+ libexpat
+else
+ LOCAL_SHARED_LIBRARIES += \
+ libexpat
+endif
+
include $(MESA_COMMON_MK)
include $(BUILD_SHARED_LIBRARY)
diff --git a/src/mesa/drivers/dri/Android.mk b/src/mesa/drivers/dri/Android.mk
index 53ff4b4f632..60c8476a38a 100644
--- a/src/mesa/drivers/dri/Android.mk
+++ b/src/mesa/drivers/dri/Android.mk
@@ -49,11 +49,19 @@ MESA_DRI_WHOLE_STATIC_LIBRARIES := \
MESA_DRI_SHARED_LIBRARIES := \
libcutils \
libdl \
- libexpat \
libglapi \
liblog \
libz
+# If Android version >=8 MESA should static link libexpat else should dynamic link
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
+MESA_DRI_WHOLE_STATIC_LIBRARIES += \
+ libexpat
+else
+MESA_DRI_SHARED_LIBRARIES += \
+ libexpat
+endif
+
#-----------------------------------------------
# Build drivers and libmesa_dri_common
diff --git a/src/util/Android.mk b/src/util/Android.mk
index 2d59e1ae15e..6d770ca9575 100644
--- a/src/util/Android.mk
+++ b/src/util/Android.mk
@@ -41,8 +41,14 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/gallium/include \
$(MESA_TOP)/src/gallium/auxiliary
+# If Android version >=8 MESA should static link libexpat else should dynamic link
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
+LOCAL_STATIC_LIBRARIES := \
+ libexpat
+else
LOCAL_SHARED_LIBRARIES := \
libexpat
+endif
LOCAL_MODULE := libmesa_util