configure: replace pkg-config calls with $(PKG_CONFIG) in the makefiles.
[mesa.git] / src / mesa / drivers / dri / i915 / Makefile
index 37f15aa7671a414975a18c4eb5fe1571af4a51f4..b7da46bc3b6c8e4992a0746b1a89e8bc1250f654 100644 (file)
@@ -4,69 +4,25 @@ include $(TOP)/configs/current
 
 LIBNAME = i915_dri.so
 
-MINIGLX_SOURCES = server/intel_dri.c
+include ../Makefile.defines
 
-DRIVER_SOURCES = \
-       i830_context.c \
-       i830_metaops.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_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 \
-       intel_swapbuffers.c \
-       i915_tex_layout.c \
-       i915_texstate.c \
-       i915_context.c \
-       i915_debug.c \
-       i915_debug_fp.c \
-       i915_fragprog.c \
-       i915_metaops.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 -I../intel/server -DI915 \
-       $(shell pkg-config libdrm --atleast-version=2.3.1 \
+DRIVER_DEFINES = $(addprefix -I$(TOP)/, $(i915_INCLUDES)) -DI915 \
+       $(shell $(PKG_CONFIG) libdrm --atleast-version=2.3.1 \
                                && echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP")
 
-DRI_LIB_DEPS += -ldrm_intel
+INCLUDES += $(INTEL_CFLAGS)
+DRI_LIB_DEPS += $(INTEL_LIBS)
 
-include ../Makefile.template
+include ../Makefile.targets
 
 intel_decode.o: ../intel/intel_decode.c