[Mesa-dev] [PATCH 09/17] gallium/i915: add automake target 'template'
Emil Velikov
emil.l.velikov at gmail.com
Sun Sep 21 16:44:06 PDT 2014
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 at gmail.com>
---
src/gallium/drivers/i915/Automake.inc | 11 +++++++++++
src/gallium/targets/dri/Makefile.am | 9 +--------
src/gallium/targets/egl-static/Makefile.am | 8 +-------
src/gallium/targets/gbm/Makefile.am | 8 +-------
src/gallium/targets/xa/Makefile.am | 8 +-------
5 files changed, 15 insertions(+), 29 deletions(-)
create mode 100644 src/gallium/drivers/i915/Automake.inc
diff --git a/src/gallium/drivers/i915/Automake.inc b/src/gallium/drivers/i915/Automake.inc
new file mode 100644
index 0000000..8cb40f2
--- /dev/null
+++ b/src/gallium/drivers/i915/Automake.inc
@@ -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
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index 6f4bf2a..9fabdc2 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -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
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am
index af7dbc3..9f87677 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -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
diff --git a/src/gallium/targets/gbm/Makefile.am b/src/gallium/targets/gbm/Makefile.am
index 6ffab18..2ac04c8 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -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
diff --git a/src/gallium/targets/xa/Makefile.am b/src/gallium/targets/xa/Makefile.am
index 04f56c0..c03edd4 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -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
--
2.1.0
More information about the mesa-dev
mailing list