[Mesa-dev] [PATCH 11/17] gallium/svga: add automake target 'template'

Emil Velikov emil.l.velikov at gmail.com
Sun Sep 21 16:44:08 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/svga/Automake.inc      | 10 ++++++++++
 src/gallium/targets/dri/Makefile.am        |  8 +-------
 src/gallium/targets/egl-static/Makefile.am |  7 +------
 src/gallium/targets/gbm/Makefile.am        |  7 +------
 src/gallium/targets/xa/Makefile.am         |  7 +------
 5 files changed, 14 insertions(+), 25 deletions(-)
 create mode 100644 src/gallium/drivers/svga/Automake.inc

diff --git a/src/gallium/drivers/svga/Automake.inc b/src/gallium/drivers/svga/Automake.inc
new file mode 100644
index 0000000..d2d1d8f
--- /dev/null
+++ b/src/gallium/drivers/svga/Automake.inc
@@ -0,0 +1,10 @@
+if HAVE_GALLIUM_SVGA
+
+TARGET_DRIVERS += vmwgfx
+TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
+TARGET_LIB_DEPS += \
+	$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
+	$(top_builddir)/src/gallium/drivers/svga/libsvga.la \
+	$(LIBDRM_LIBS)
+
+endif
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index f76a953..cf4a025 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -108,13 +108,7 @@ STATIC_TARGET_LIB_DEPS += \
 	$(RADEON_LIBS)
 endif
 
-if HAVE_GALLIUM_SVGA
-MEGADRIVERS += vmwgfx
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
-STATIC_TARGET_LIB_DEPS += \
-	$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
-	$(top_builddir)/src/gallium/drivers/svga/libsvga.la
-endif
+include $(top_srcdir)/src/gallium/drivers/svga/Automake.inc
 
 include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am
index 43feb63..788d3fd 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -203,12 +203,7 @@ egl_gallium_la_LIBADD += \
 	$(RADEON_LIBS)
 endif
 
-if HAVE_GALLIUM_SVGA
-egl_gallium_la_CPPFLAGS += -DGALLIUM_VMWGFX
-egl_gallium_la_LIBADD += \
-	$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
-	$(top_builddir)/src/gallium/drivers/svga/libsvga.la
-endif
+include $(top_srcdir)/src/gallium/drivers/svga/Automake.inc
 
 include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
diff --git a/src/gallium/targets/gbm/Makefile.am b/src/gallium/targets/gbm/Makefile.am
index 53f8c1a..2b05265 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -98,12 +98,7 @@ STATIC_TARGET_LIB_DEPS += \
 	$(RADEON_LIBS)
 endif
 
-if HAVE_GALLIUM_SVGA
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
-STATIC_TARGET_LIB_DEPS += \
-	$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
-	$(top_builddir)/src/gallium/drivers/svga/libsvga.la
-endif
+include $(top_srcdir)/src/gallium/drivers/svga/Automake.inc
 
 include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
diff --git a/src/gallium/targets/xa/Makefile.am b/src/gallium/targets/xa/Makefile.am
index a76ea8d..e26b43a 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -67,12 +67,7 @@ include $(top_srcdir)/src/gallium/drivers/ilo/Automake.inc
 
 include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
 
-if HAVE_GALLIUM_SVGA
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
-STATIC_TARGET_LIB_DEPS += \
-	$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
-	$(top_builddir)/src/gallium/drivers/svga/libsvga.la
-endif
+include $(top_srcdir)/src/gallium/drivers/svga/Automake.inc
 
 include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
-- 
2.1.0



More information about the mesa-dev mailing list