[Mesa-dev] [PATCH 01/15] mesa: Add toplevel Android.mk

Chad Versace chad at chad-versace.us
Thu Aug 4 02:47:10 PDT 2011


This is the first step in porting libGLES* and libEGL to Android.

The makefile doesn't build anything yet; it just defines common variables.

The values for MESA_COMMON_C_FLAGS and MESA_COMMON_CPP_FLAGS, I obtained
by invoking autogen.sh with the options below and then inspecting
MESA_TOP/configs/autoconf. My immediate goal is to port i965 to Android,
so I used the typical flags for building i965.
    --disable-gallium
    --disable-glu
    --disable-glw
    --disable-glut
    --enable-32-bit
    --enable-egl
    --enable-gles2
    --enable-gles1
    --enable-texture-float
    --with-dri-drivers=i965
    --with-gallium-drivers=

Note: This is in preparation for porting i965 to Android.
CC: Chia-I Wu <olv at lunarg.com>,
CC: Chih-Wei Huang <cwhuang at android-x86.org>
Signed-off-by: Chad Versace <chad at chad-versace.us>
---
 Android.mk                 |   66 ++++++++++++++++++++++++++++++++++++++++++++
 android/mesa_local_vars.mk |   32 +++++++++++++++++++++
 2 files changed, 98 insertions(+), 0 deletions(-)
 create mode 100644 Android.mk
 create mode 100644 android/mesa_local_vars.mk

diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..4158194
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,66 @@
+#
+# Copyright © 2011 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+ifneq ($(TARGET_SIMULATOR),true)
+
+LOCAL_PATH := $(call my-dir)
+
+# Top directory of Mesa project.
+MESA_TOP := $(LOCAL_PATH)
+
+MESA_PLATFORM := android
+
+# Each Android.mk must include MESA_LOCAL_VARS before "building" any targets.
+MESA_LOCAL_VARS := $(LOCAL_PATH)/android/mesa_local_vars.mk
+
+MESA_COMMON_C_INCLUDES := \
+	$(MESA_TOP)/include \
+	$(MESA_TOP)/src
+
+MESA_COMMON_CFLAGS :=                          \
+	-std=c99                               \
+	                                       \
+	-Wall                                  \
+	-Wmissing-prototypes                   \
+	-Wno-sign-compare                      \
+	-Wno-sign-compare                      \
+	                                       \
+	-ffast-math                            \
+	-fvisibility=hidden                    \
+	                                       \
+	-DFEATURE_ES1                          \
+	-DFEATURE_ES2                          \
+	-D_GNU_SOURCE                          \
+	-DHAVE_POSIX_MEMALIGN                  \
+	-DPTHREADS                             \
+	-DTEXTURE_FLOAT_ENABLED                \
+	-DUSE_X86_ASM
+
+MESA_COMMON_CPPFLAGS := \
+	-Wno-error=non-virtual-dtor \
+	-Wno-non-virtual-dtor
+
+MESA_PYTHON2 := python2
+MESA_PYTHON_FLAGS := -OO -tt
+
+endif # !TARGET_SIMULATOR
diff --git a/android/mesa_local_vars.mk b/android/mesa_local_vars.mk
new file mode 100644
index 0000000..2f8abde
--- /dev/null
+++ b/android/mesa_local_vars.mk
@@ -0,0 +1,32 @@
+#
+# Copyright © 2011 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+#
+# file: mesa_local_vars.mk
+#
+# Each Android.mk must include this file before "building" any targets.
+#
+
+LOCAL_CFLAGS += $(MESA_COMMON_CFLAGS)
+LOCAL_CPPFLAGS += $(MESA_COMMON_CPPFLAGS)
+LOCAL_C_INCLUDES += $(MESA_COMMON_C_INCLUDES)
-- 
1.7.6



More information about the mesa-dev mailing list