[Mesa-dev] [PATCH 08/15] mesa: Build libmesa_main for Android
Chad Versace
chad at chad-versace.us
Thu Aug 4 02:47:17 PDT 2011
The libmesa_main.a built on Android is analagous to the libmesa.a built on
Linux.
The libname is libmesa_main, rather than libmesa, due to conventions of
the Android build system. Names of intermediate libraries should be
prefixes by the project name so to prevent naming collisions in the build
tree. (For an example, grep for `libc_` in bionic's Makefiles).
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>
---
src/mesa/Android.mk | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 56 insertions(+), 0 deletions(-)
create mode 100644 src/mesa/Android.mk
diff --git a/src/mesa/Android.mk b/src/mesa/Android.mk
new file mode 100644
index 0000000..11259e3
--- /dev/null
+++ b/src/mesa/Android.mk
@@ -0,0 +1,56 @@
+#
+# 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.
+#
+# Authors:
+# Chad Versace <chad at chad-versace.us>
+#
+
+# ----------------------------------------------------------------------------
+# Build libmesa_main
+# ----------------------------------------------------------------------------
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_main
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+intermediates := $(call local-intermediates-dir)
+
+# Import the following variables:
+# INCLUDE_DIRS
+# MESA_SOURCES
+# MESA_CXX_SOURCES
+# MESA_ASM_SOURCES
+include $(LOCAL_PATH)/sources.mak
+
+LOCAL_C_INCLUDES := \
+ $(INCLUDE_DIRS) \
+ $(intermediates) # For lex and yacc headers
+
+LOCAL_C_SRCS := \
+ $(addprefix $(LOCAL_PATH)/, $(MESA_SOURCES)) \
+ $(addprefix $(LOCAL_PATH)/, $(MESA_CXX_SOURCES)) \
+ $(addprefix $(LOCAL_PATH)/, $(MESA_ASM_SOURCES))
+
+include $(MESA_LOCAL_VARS)
+include $(BUILD_STATIC_LIBRARY)
--
1.7.6
More information about the mesa-dev
mailing list