android: Define Make variables for Android version
Define the following Make variables: MESA_ANDROID_MAJOR_VERSION MESA_ANDROID_MINOR_VERSION MESA_ANDROID_VERSION These variable will allow us to make version-dependent decisions on library dependencies. In particular, building Mesa against JellyBean will require libsync. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
@@ -34,10 +34,8 @@ LOCAL_C_INCLUDES += \
|
|||||||
$(MESA_TOP)/include
|
$(MESA_TOP)/include
|
||||||
|
|
||||||
# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
|
# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
|
||||||
major := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
|
|
||||||
minor := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
|
|
||||||
LOCAL_CFLAGS += \
|
LOCAL_CFLAGS += \
|
||||||
-DANDROID_VERSION=0x0$(major)0$(minor)
|
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
|
||||||
|
|
||||||
LOCAL_CFLAGS += \
|
LOCAL_CFLAGS += \
|
||||||
-DHAVE_PTHREAD=1 \
|
-DHAVE_PTHREAD=1 \
|
||||||
|
@@ -30,6 +30,11 @@
|
|||||||
# module will also be built. DRI modules will be loaded by libGLES_mesa.
|
# module will also be built. DRI modules will be loaded by libGLES_mesa.
|
||||||
|
|
||||||
MESA_TOP := $(call my-dir)
|
MESA_TOP := $(call my-dir)
|
||||||
|
|
||||||
|
MESA_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
|
||||||
|
MESA_ANDROID_MINOR_VERSION := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
|
||||||
|
MESA_ANDROID_VERSION := $(MESA_ANDROID_MAJOR_VERSION).$(MESA_ANDROID_MINOR_VERSION)
|
||||||
|
|
||||||
MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
|
MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
|
||||||
MESA_PYTHON2 := python
|
MESA_PYTHON2 := python
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user