[Mesa-dev] [PATCH 18/18] android: make libGLES_mesa real

Chia-I Wu olvaffe at gmail.com
Tue Aug 16 23:28:21 PDT 2011


libGLES_mesa with swrast should link in these libraries

  libmesa_egl
  libmesa_st_egl
  libmesa_st_mesa
  libmesa_glsl
  libmesa_glsl_utils
  libmesa_pipe_softpipe
  libmesa_winsys_sw_android
  libmesa_gallium
---
 Android.mk                                |   11 ++++++
 src/gallium/targets/egl-static/Android.mk |   54 +++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/Android.mk b/Android.mk
index 5a4e133..5e4c09d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -29,6 +29,17 @@
 #
 # The main target is libGLES_mesa.  There is no classic drivers yet.
 #
+# Gallium drivers depend on
+#
+#   libmesa_egl
+#   libmesa_st_egl
+#   libmesa_st_mesa
+#   libmesa_glsl
+#   libmesa_glsl_utils
+#   libmesa_pipe_<DRIVER>
+#   libmesa_winsys_<DRIVER>
+#   libmesa_gallium
+#
 # The rules can be found in src/gallium/targets/Android.mk.
 
 LOCAL_PATH := $(call my-dir)
diff --git a/src/gallium/targets/egl-static/Android.mk b/src/gallium/targets/egl-static/Android.mk
index e62fcaa..1f7c41c 100644
--- a/src/gallium/targets/egl-static/Android.mk
+++ b/src/gallium/targets/egl-static/Android.mk
@@ -32,6 +32,60 @@ LOCAL_SRC_FILES :=
 LOCAL_CFLAGS :=
 LOCAL_C_INCLUDES :=
 
+LOCAL_STATIC_LIBRARIES :=
+LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_egl
+
+LOCAL_SHARED_LIBRARIES := \
+	libglapi \
+	libdrm \
+	libdl \
+	libhardware \
+	liblog \
+	libcutils
+
+ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
+
+LOCAL_SRC_FILES += \
+	egl.c \
+	egl_pipe.c \
+	egl_st.c
+
+LOCAL_CFLAGS += \
+	-DFEATURE_ES1=1 \
+	-DFEATURE_ES2=1 \
+	-D_EGL_MAIN=_eglBuiltInDriverGALLIUM
+
+LOCAL_C_INCLUDES += \
+	$(GALLIUM_TOP)/state_trackers/vega \
+	$(GALLIUM_TOP)/state_trackers/egl \
+	$(MESA_TOP)/src/egl/main \
+	$(MESA_TOP)/src/mesa \
+	$(DRM_TOP)/include/drm \
+	$(DRM_TOP)
+
+gallium_DRIVERS :=
+
+# swrast
+gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_android
+LOCAL_CFLAGS += -DGALLIUM_SOFTPIPE
+
+#
+# Notes about the order here:
+#
+#  * libmesa_st_egl depends on libmesa_winsys_sw_android in $(gallium_DRIVERS)
+#  * libmesa_st_mesa depends on libmesa_glsl
+#  * libmesa_glsl depends on libmesa_glsl_utils
+#
+LOCAL_STATIC_LIBRARIES := \
+	libmesa_st_egl \
+	$(gallium_DRIVERS) \
+	libmesa_st_mesa \
+	libmesa_glsl \
+	libmesa_glsl_utils \
+	libmesa_gallium
+
+endif # MESA_BUILD_GALLIUM
+
 LOCAL_MODULE := libGLES_mesa
 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
 
-- 
1.7.5.4



More information about the mesa-dev mailing list