The libmesa_dri_common and libmesa_egl_dri2 should not be limited to the
classical drivers only. Allow them to be built with the gallium drivers.

v2: add a clean step to rebuild all dri modules properly.

Signed-off-by: Chih-Wei Huang <cwhu...@linux.org.tw>
---
 Android.mk              | 6 +-----
 CleanSpec.mk            | 1 +
 src/egl/main/Android.mk | 8 ++------
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/Android.mk b/Android.mk
index b19419b..6a09a9d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -89,13 +89,9 @@ SUBDIRS := \
        src/glsl \
        src/mesa \
        src/util \
-       src/egl/main
-
-ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
-SUBDIRS += \
+       src/egl/main \
        src/egl/drivers/dri2 \
        src/mesa/drivers/dri
-endif
 
 ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
 SUBDIRS += src/gallium
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 2068163..d08b0de 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -13,3 +13,4 @@ $(call add-clean-step, rm -rf 
$(PRODUCT_OUT)/*/SHARED_LIBRARIES/libGLES_mesa_int
 $(call add-clean-step, rm -rf 
$(HOST_OUT_release)/*/EXECUTABLES/mesa_*_intermediates)
 $(call add-clean-step, rm -rf 
$(HOST_OUT_release)/*/EXECUTABLES/glsl_compiler_intermediates)
 $(call add-clean-step, rm -rf 
$(HOST_OUT_release)/*/STATIC_LIBRARIES/libmesa_*_intermediates)
+$(call add-clean-step, rm -rf 
$(PRODUCT_OUT)/*/SHARED_LIBRARIES/*_dri_intermediates)
diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk
index 12b66d0..27d0b18 100644
--- a/src/egl/main/Android.mk
+++ b/src/egl/main/Android.mk
@@ -62,10 +62,10 @@ ifneq ($(MESA_GPU_DRIVERS),swrast)
 LOCAL_SHARED_LIBRARIES += libdrm
 endif
 
-ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
 LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
 LOCAL_STATIC_LIBRARIES += libmesa_egl_dri2
 
+ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
 # require i915_dri and/or i965_dri
 LOCAL_REQUIRED_MODULES += \
        $(addsuffix _dri, $(filter i915 i965, $(MESA_GPU_DRIVERS)))
@@ -75,9 +75,6 @@ ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
 
 gallium_DRIVERS :=
 
-# swrast
-gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_android
-
 # freedreno
 ifneq ($(filter freedreno, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_winsys_freedreno libmesa_pipe_freedreno
@@ -137,8 +134,6 @@ endif
 #  * libmesa_glsl depends on libmesa_glsl_utils
 #
 LOCAL_STATIC_LIBRARIES := \
-       libmesa_egl_gallium \
-       libmesa_st_egl \
        $(gallium_DRIVERS) \
        libmesa_st_mesa \
        libmesa_util \
@@ -147,6 +142,7 @@ LOCAL_STATIC_LIBRARIES := \
        libmesa_gallium \
        $(LOCAL_STATIC_LIBRARIES)
 
+LOCAL_REQUIRED_MODULES += gallium_dri
 endif # MESA_BUILD_GALLIUM
 
 LOCAL_STATIC_LIBRARIES := \
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to