summaryrefslogtreecommitdiff
path: root/Android.common.mk
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2011-11-25 11:59:02 +0800
committerChia-I Wu <olv@lunarg.com>2011-11-25 12:34:33 +0800
commit75cc24c876059d6eb183e07ed802f997fb416864 (patch)
treed54eaf925a263684e7086a8671db540636e0660d /Android.common.mk
parent42c2c371d6c4c82c3e9176e028281a91edfadafd (diff)
android: add support for ICS
With ICS (Android 4.0), several headers and structs are renamed. Define ANDROID_VERSION so that we can choose a different path depending on the platform version. I've tested only softpipe and llvmpipe. r600g is also reported to work.
Diffstat (limited to 'Android.common.mk')
-rw-r--r--Android.common.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/Android.common.mk b/Android.common.mk
index 83177a0cbe..f28ddc2ef6 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -24,6 +24,12 @@
LOCAL_C_INCLUDES += \
$(MESA_TOP)/include
+# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
+major := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
+minor := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
+LOCAL_CFLAGS += \
+ -DANDROID_VERSION=0x0$(major)0$(minor)
+
LOCAL_CFLAGS += \
-DPTHREADS \
-fvisibility=hidden \