[Mesa-dev] [PATCH 15/15] i965: Build libi965_dri on Android
Chad Versace
chad at chad-versace.us
Thu Aug 4 02:47:24 PDT 2011
The driver doesn't work yet, it just builds. Currently, it's not being
linked to libdrm.
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 | 7 ++++
src/mesa/drivers/Android.mk | 1 +
src/mesa/drivers/dri/Android.mk | 10 +++++
src/mesa/drivers/dri/i965/Android.mk | 61 ++++++++++++++++++++++++++++++++++
4 files changed, 79 insertions(+), 0 deletions(-)
create mode 100644 src/mesa/drivers/Android.mk
create mode 100644 src/mesa/drivers/dri/Android.mk
create mode 100644 src/mesa/drivers/dri/i965/Android.mk
diff --git a/src/mesa/Android.mk b/src/mesa/Android.mk
index 11259e3..76f7930 100644
--- a/src/mesa/Android.mk
+++ b/src/mesa/Android.mk
@@ -54,3 +54,10 @@ LOCAL_C_SRCS := \
include $(MESA_LOCAL_VARS)
include $(BUILD_STATIC_LIBRARY)
+
+
+# ----------------------------------------------------------------------------
+# Build drivers
+# ----------------------------------------------------------------------------
+
+include $(LOCAL_PATH)/drivers/Android.mk
diff --git a/src/mesa/drivers/Android.mk b/src/mesa/drivers/Android.mk
new file mode 100644
index 0000000..5053e7d
--- /dev/null
+++ b/src/mesa/drivers/Android.mk
@@ -0,0 +1 @@
+include $(call all-subdir-makefiles)
diff --git a/src/mesa/drivers/dri/Android.mk b/src/mesa/drivers/dri/Android.mk
new file mode 100644
index 0000000..0d016f3
--- /dev/null
+++ b/src/mesa/drivers/dri/Android.mk
@@ -0,0 +1,10 @@
+#
+# Include the driver that the board requires.
+#
+# TODO: i915
+# TODO: gallium drivers
+#
+
+ifeq ($(BOARD_USES_I965), true)
+ include $(MESA_TOP)/src/mesa/drivers/dri/i965/Android.mk
+endif
diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
new file mode 100644
index 0000000..eecf28e
--- /dev/null
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -0,0 +1,61 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libi965_dri
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/dri
+
+# Import the following variables:
+# COMMON_SOURCES
+# SHARED_INCLUDES
+include $(MESA_TOP)/src/mesa/drivers/dri/Makefile.defines
+
+# Import the following variables:
+# I965_C_SOURCES
+# I965_CXX_SOURCES
+include $(LOCAL_PATH)/sources.mk
+I965_C_SOURCES := $(addprefix $(LOCAL_PATH)/, $(I965_C_SOURCES))
+I965_CXX_SOURCES := $(addprefix $(LOCAL_PATH)/, $(I965_CXX_SOURCES))
+
+LOCAL_C_SOURCES := \
+ $(COMMON_SOURCES) \
+ $(I965_C_SOURCES) \
+ $(I965_CXX_SOURCES)
+
+LOCAL_C_INCLUDES := \
+ $(MESA_TOP)/src/mesa/drivers/dri/intel \
+ $(SHARED_INCLUDES)
+
+# TODO: Link to libdrm once it is building on Android.
+#LOCAL_SHARED_LIBRARIES := \
+# libdrm
+
+LOCAL_REQUIRED_MODULES := \
+ libmesa_main
+
+include $(MESA_LOCAL_VARS)
+include $(BUILD_SHARED_LIBRARY)
--
1.7.6
More information about the mesa-dev
mailing list