gallium/freedreno: add automake target 'template'
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 21 Sep 2014 14:30:53 +0000 (15:30 +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/freedreno/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/freedreno/Automake.inc b/src/gallium/drivers/freedreno/Automake.inc
new file mode 100644 (file)
index 0000000..1fdf91c
--- /dev/null
@@ -0,0 +1,11 @@
+if HAVE_GALLIUM_FREEDRENO
+
+TARGET_DRIVERS += msm kgsl
+TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
+TARGET_LIB_DEPS += \
+       $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
+       $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
+       $(FREEDRENO_LIBS) \
+       $(LIBDRM_LIBS)
+
+endif
index b75d7b09ee30e47a8c358396e4a01e4655014ab3..6f4bf2a0e75d75f568096315fb280297ac798485 100644 (file)
@@ -130,15 +130,7 @@ STATIC_TARGET_LIB_DEPS += \
        $(top_builddir)/src/gallium/drivers/svga/libsvga.la
 endif
 
-if HAVE_GALLIUM_FREEDRENO
-MEGADRIVERS += msm kgsl
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
-STATIC_TARGET_LIB_DEPS += \
-       $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
-       $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
-       $(FREEDRENO_LIBS)
-
-endif
+include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
 if HAVE_GALLIUM_VC4
 MEGADRIVERS += vc4
index 16c457b33800b7900bfb7d5dc9d8b82e361bc653..08c116cf5cee1fe76f42d3c0b78c84a5afd0364f 100644 (file)
@@ -217,14 +217,7 @@ egl_gallium_la_LIBADD += \
        $(top_builddir)/src/gallium/drivers/svga/libsvga.la
 endif
 
-if HAVE_GALLIUM_FREEDRENO
-egl_gallium_la_CPPFLAGS += -DGALLIUM_FREEDRENO
-egl_gallium_la_LIBADD += \
-       $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
-       $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
-       $(FREEDRENO_LIBS)
-
-endif
+include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
 if HAVE_GALLIUM_SOFTPIPE
 egl_gallium_la_CPPFLAGS += -DGALLIUM_SOFTPIPE
index 1271825f96b953f1db0801aeb78fa119ba3a879f..b2cd92cc2ad6ec1eb69979e9b6f146a4073f7be5 100644 (file)
@@ -116,14 +116,7 @@ STATIC_TARGET_LIB_DEPS += \
        $(top_builddir)/src/gallium/drivers/svga/libsvga.la
 endif
 
-if HAVE_GALLIUM_FREEDRENO
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
-STATIC_TARGET_LIB_DEPS += \
-       $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
-       $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
-       $(FREEDRENO_LIBS)
-
-endif
+include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
 gbm_gallium_drm_la_SOURCES += target.c
 gbm_gallium_drm_la_CPPFLAGS = $(STATIC_TARGET_CPPFLAGS) $(TARGET_CPPFLAGS)
index 4cd820b18ce32edd98fbe4a5f8201473f39c53a8..04f56c0cd81e859a719cb0737945c3b9c6e3e6ec 100644 (file)
@@ -86,14 +86,7 @@ STATIC_TARGET_LIB_DEPS += \
        $(top_builddir)/src/gallium/drivers/svga/libsvga.la
 endif
 
-if HAVE_GALLIUM_FREEDRENO
-STATIC_TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
-STATIC_TARGET_LIB_DEPS += \
-       $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
-       $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
-       $(FREEDRENO_LIBS)
-
-endif
+include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
 libxatracker_la_SOURCES += target.c
 libxatracker_la_CPPFLAGS = $(STATIC_TARGET_CPPFLAGS) $(TARGET_CPPFLAGS)