i965: Refactor depth count write PIPE_CONTROLs into a helper function.
[mesa.git] / Android.mk
index c1ee38102e9e07f384ffab6cc88bb40dd9132bfd..6a3014c81bb860fbfc3d4e7f25ccfb06c70f1f6f 100644 (file)
 
 # BOARD_GPU_DRIVERS should be defined.  The valid values are
 #
-#   classic drivers:
-#   gallium drivers: swrast
+#   classic drivers: i915 i965
+#   gallium drivers: swrast i915g nouveau r300g r600g radeonsi vmwgfx
 #
-# The main target is libGLES_mesa.  There is no classic drivers yet.
+# The main target is libGLES_mesa.  For each classic driver enabled, a DRI
+# module will also be built.  DRI modules will be loaded by libGLES_mesa.
 
 MESA_TOP := $(call my-dir)
 MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
@@ -35,10 +36,10 @@ MESA_PYTHON2 := python
 DRM_TOP := external/drm
 DRM_GRALLOC_TOP := hardware/drm_gralloc
 
-classic_drivers :=
-gallium_drivers := swrast
+classic_drivers := i915 i965
+gallium_drivers := swrast i915g nouveau r300g r600g radeonsi vmwgfx
 
-MESA_GPU_DRIVERS := $(BOARD_GPU_DRIVERS)
+MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS))
 
 # warn about invalid drivers
 invalid_drivers := $(filter-out \
@@ -68,33 +69,26 @@ else
 MESA_BUILD_GALLIUM := false
 endif
 
+# add subdirectories
 ifneq ($(strip $(MESA_GPU_DRIVERS)),)
 
-SUBDIRS :=
+SUBDIRS := \
+       src/mapi \
+       src/glsl \
+       src/mesa \
+       src/egl/main
+
+ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
+SUBDIRS += \
+       src/egl/drivers/dri2 \
+       src/mesa/drivers/dri
+endif
 
 ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
 SUBDIRS += src/gallium
 endif
 
-# ---------------------------------------
-# Build libGLES_mesa
-# ---------------------------------------
-
-LOCAL_PATH := $(MESA_TOP)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES :=
-LOCAL_CFLAGS :=
-LOCAL_C_INCLUDES :=
-
-LOCAL_MODULE := libGLES_mesa
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
-
-include $(MESA_COMMON_MK)
-include $(BUILD_SHARED_LIBRARY)
-
 mkfiles := $(patsubst %,$(MESA_TOP)/%/Android.mk,$(SUBDIRS))
--include $(mkfiles)
+include $(mkfiles)
 
-endif # MESA_GPU_DRIVERS
+endif