gallium/i915: add automake target 'template'
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 21 Sep 2014 14:34:07 +0000 (15:34 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 24 Sep 2014 09:44:00 +0000 (10:44 +0100)
Rather than duplicating the libdeps, extra define... all over the
targets, define them only once and use when applicable.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
src/gallium/drivers/i915/Automake.inc [new file with mode: 0644]
src/gallium/targets/dri/Makefile.am
src/gallium/targets/egl-static/Makefile.am
src/gallium/targets/gbm/Makefile.am
src/gallium/targets/xa/Makefile.am

diff --git a/src/gallium/drivers/i915/Automake.inc b/src/gallium/drivers/i915/Automake.inc
new file mode 100644 (file)
index 0000000..8cb40f2
--- /dev/null
@@ -0,0 +1,11 @@
+if HAVE_GALLIUM_I915
+
+TARGET_DRIVERS += i915
+TARGET_CPPFLAGS += -DGALLIUM_I915
+TARGET_LIB_DEPS += \
+       $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
+       $(top_builddir)/src/gallium/drivers/i915/libi915.la \
+       $(INTEL_LIBS) \
+       $(LIBDRM_LIBS)
+
+endif
index 6f4bf2a0e75d75f568096315fb280297ac798485..9fabdc27bba113c07d03ccfc25965b6c5d9b41bc 100644 (file)
@@ -68,14 +68,7 @@ TARGET_DRIVERS =
 TARGET_CPPFLAGS =
 TARGET_LIB_DEPS =
 
-if HAVE_GALLIUM_I915
-MEGADRIVERS += i915
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_I915
-STATIC_TARGET_LIB_DEPS += \
-       $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
-       $(top_builddir)/src/gallium/drivers/i915/libi915.la \
-       $(INTEL_LIBS)
-endif
+include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
 
 if HAVE_GALLIUM_ILO
 MEGADRIVERS += ilo
index 08c116cf5cee1fe76f42d3c0b78c84a5afd0364f..33c6c0a29bf65023bd415e2738363615c3754e85 100644 (file)
@@ -161,13 +161,7 @@ TARGET_DRIVERS =
 TARGET_CPPFLAGS =
 TARGET_LIB_DEPS =
 
-if HAVE_GALLIUM_I915
-egl_gallium_la_CPPFLAGS += -DGALLIUM_I915
-egl_gallium_la_LIBADD += \
-       $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
-       $(top_builddir)/src/gallium/drivers/i915/libi915.la \
-       $(INTEL_LIBS)
-endif
+include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
 
 if HAVE_GALLIUM_ILO
 egl_gallium_la_CPPFLAGS += -DGALLIUM_ILO
index b2cd92cc2ad6ec1eb69979e9b6f146a4073f7be5..f339faeebf8f4220bb5420c6cedfb2673122ed76 100644 (file)
@@ -60,13 +60,7 @@ TARGET_DRIVERS =
 TARGET_CPPFLAGS =
 TARGET_LIB_DEPS =
 
-if HAVE_GALLIUM_I915
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_I915
-STATIC_TARGET_LIB_DEPS += \
-       $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
-       $(top_builddir)/src/gallium/drivers/i915/libi915.la \
-       $(INTEL_LIBS)
-endif
+include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
 
 if HAVE_GALLIUM_ILO
 STATIC_TARGET_CPPFLAGS += -DGALLIUM_ILO
index 04f56c0cd81e859a719cb0737945c3b9c6e3e6ec..c03edd46c5093c24f2a123fd2d77f07333a02cd1 100644 (file)
@@ -61,13 +61,7 @@ TARGET_DRIVERS =
 TARGET_CPPFLAGS =
 TARGET_LIB_DEPS =
 
-if HAVE_GALLIUM_I915
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_I915
-STATIC_TARGET_LIB_DEPS += \
-       $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
-       $(top_builddir)/src/gallium/drivers/i915/libi915.la \
-       $(INTEL_LIBS)
-endif
+include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
 
 if HAVE_GALLIUM_ILO
 STATIC_TARGET_CPPFLAGS += -DGALLIUM_ILO