i915: factor our source lists into Makefile.sources
authorChia-I Wu <olv@lunarg.com>
Wed, 31 Aug 2011 04:21:28 +0000 (12:21 +0800)
committerChia-I Wu <olv@lunarg.com>
Thu, 1 Sep 2011 02:53:30 +0000 (10:53 +0800)
In preparation for porting i915 to Android, factor its source lists into
a shared makefile. This prevents duplication of source lists, and hence
prevents the Android build from breaking as often.

Reviewed-by: Chad Versace <chad@chad-versace.us>
src/mesa/drivers/dri/i915/Makefile
src/mesa/drivers/dri/i915/Makefile.sources [new file with mode: 0644]

index 79e03f2f1d1b6d988d1639c982fd5f9aa7d561ed..e2e5382b782bdfc786457a97392efadff843cc20 100644 (file)
@@ -6,59 +6,16 @@ LIBNAME = i915_dri.so
 
 include ../Makefile.defines
 
-DRIVER_SOURCES = \
-       i830_context.c \
-       i830_state.c \
-       i830_texblend.c \
-       i830_texstate.c \
-       i830_vtbl.c \
-       intel_render.c \
-       intel_regions.c \
-       intel_buffer_objects.c \
-       intel_batchbuffer.c \
-       intel_clear.c \
-       intel_extensions.c \
-       intel_extensions_es2.c \
-       intel_mipmap_tree.c \
-       intel_tex_layout.c \
-       intel_tex_image.c \
-       intel_tex_subimage.c \
-       intel_tex_copy.c \
-       intel_tex_validate.c \
-       intel_tex_format.c \
-       intel_tex.c \
-       intel_pixel.c \
-       intel_pixel_bitmap.c \
-       intel_pixel_copy.c \
-       intel_pixel_draw.c \
-       intel_pixel_read.c \
-       intel_buffers.c \
-       intel_blit.c \
-       i915_tex_layout.c \
-       i915_texstate.c \
-       i915_context.c \
-       i915_debug.c \
-       i915_debug_fp.c \
-       i915_fragprog.c \
-       i915_program.c \
-       i915_state.c \
-       i915_vtbl.c \
-       intel_context.c \
-       intel_decode.c \
-       intel_screen.c \
-       intel_span.c \
-       intel_state.c \
-       intel_syncobj.c \
-       intel_tris.c \
-       intel_fbo.c
+# Import variables i915_*.
+include Makefile.sources
 
 C_SOURCES = \
        $(COMMON_SOURCES) \
-       $(DRIVER_SOURCES)
+       $(i915_C_SOURCES)
 
 ASM_SOURCES = 
 
-DRIVER_DEFINES = -I../intel -DI915 \
+DRIVER_DEFINES = $(addprefix -I$(TOP)/, $(i915_INCLUDES)) -DI915 \
        $(shell pkg-config libdrm --atleast-version=2.3.1 \
                                && echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP")
 
diff --git a/src/mesa/drivers/dri/i915/Makefile.sources b/src/mesa/drivers/dri/i915/Makefile.sources
new file mode 100644 (file)
index 0000000..8aee589
--- /dev/null
@@ -0,0 +1,49 @@
+# Paths are relative to TOP.
+i915_INCLUDES := \
+       src/mesa/drivers/dri/intel
+
+i915_C_SOURCES := \
+       i830_context.c \
+       i830_state.c \
+       i830_texblend.c \
+       i830_texstate.c \
+       i830_vtbl.c \
+       intel_render.c \
+       intel_regions.c \
+       intel_buffer_objects.c \
+       intel_batchbuffer.c \
+       intel_clear.c \
+       intel_extensions.c \
+       intel_extensions_es2.c \
+       intel_mipmap_tree.c \
+       intel_tex_layout.c \
+       intel_tex_image.c \
+       intel_tex_subimage.c \
+       intel_tex_copy.c \
+       intel_tex_validate.c \
+       intel_tex_format.c \
+       intel_tex.c \
+       intel_pixel.c \
+       intel_pixel_bitmap.c \
+       intel_pixel_copy.c \
+       intel_pixel_draw.c \
+       intel_pixel_read.c \
+       intel_buffers.c \
+       intel_blit.c \
+       i915_tex_layout.c \
+       i915_texstate.c \
+       i915_context.c \
+       i915_debug.c \
+       i915_debug_fp.c \
+       i915_fragprog.c \
+       i915_program.c \
+       i915_state.c \
+       i915_vtbl.c \
+       intel_context.c \
+       intel_decode.c \
+       intel_screen.c \
+       intel_span.c \
+       intel_state.c \
+       intel_syncobj.c \
+       intel_tris.c \
+       intel_fbo.c