[Mesa-dev] [PATCH 24/37] targets/vdpau: compact compiler flags into Automake.inc
Emil Velikov
emil.l.velikov at gmail.com
Sat Nov 2 12:00:54 PDT 2013
Store the compiler flags into a variable, in order to minimise
flags duplication (amongst vdpau and xvmc).
Note: this commit add VISIBILITY_CFLAGS to the following targets
* nouveau
* softpipe
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/gallium/Automake.inc | 11 +++++++++++
src/gallium/targets/r300/vdpau/Makefile.am | 8 +-------
src/gallium/targets/r600/vdpau/Makefile.am | 8 +-------
src/gallium/targets/radeonsi/vdpau/Makefile.am | 8 +-------
src/gallium/targets/vdpau-nouveau/Makefile.am | 7 +------
src/gallium/targets/vdpau-softpipe/Makefile.am | 8 ++------
6 files changed, 17 insertions(+), 33 deletions(-)
diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 5cb0b26..b242bb4 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -25,3 +25,14 @@ GALLIUM_DRIVER_CXXFLAGS = \
-I$(top_srcdir)/src/gallium/drivers \
$(DEFINES) \
$(VISIBILITY_CXXFLAGS)
+
+GALLIUM_VIDEO_CFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/gallium/include \
+ -I$(top_srcdir)/src/gallium/auxiliary \
+ -I$(top_srcdir)/src/gallium/drivers \
+ -I$(top_srcdir)/src/gallium/winsys \
+ $(DEFINES) \
+ $(PTHREAD_CFLAGS) \
+ $(LIBDRM_CFLAGS) \
+ $(VISIBILITY_CFLAGS)
diff --git a/src/gallium/targets/r300/vdpau/Makefile.am b/src/gallium/targets/r300/vdpau/Makefile.am
index 9b0039b..9bc19d7 100644
--- a/src/gallium/targets/r300/vdpau/Makefile.am
+++ b/src/gallium/targets/r300/vdpau/Makefile.am
@@ -23,13 +23,7 @@
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
- $(GALLIUM_CFLAGS) \
- $(PTHREAD_CFLAGS) \
- $(LIBDRM_CFLAGS) \
- $(VISIBILITY_CFLAGS)
-AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gallium/drivers \
- -I$(top_srcdir)/src/gallium/winsys
+ $(GALLIUM_VIDEO_CFLAGS)
vdpaudir = $(VDPAU_LIB_INSTALL_DIR)
vdpau_LTLIBRARIES = libvdpau_r300.la
diff --git a/src/gallium/targets/r600/vdpau/Makefile.am b/src/gallium/targets/r600/vdpau/Makefile.am
index 4f1ff1d..8da78e8 100644
--- a/src/gallium/targets/r600/vdpau/Makefile.am
+++ b/src/gallium/targets/r600/vdpau/Makefile.am
@@ -23,13 +23,7 @@
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
- $(GALLIUM_CFLAGS) \
- $(PTHREAD_CFLAGS) \
- $(LIBDRM_CFLAGS) \
- $(VISIBILITY_CFLAGS)
-AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gallium/drivers \
- -I$(top_srcdir)/src/gallium/winsys
+ $(GALLIUM_VIDEO_CFLAGS)
vdpaudir = $(VDPAU_LIB_INSTALL_DIR)
vdpau_LTLIBRARIES = libvdpau_r600.la
diff --git a/src/gallium/targets/radeonsi/vdpau/Makefile.am b/src/gallium/targets/radeonsi/vdpau/Makefile.am
index 5fac8da..8dd7dc4 100644
--- a/src/gallium/targets/radeonsi/vdpau/Makefile.am
+++ b/src/gallium/targets/radeonsi/vdpau/Makefile.am
@@ -23,13 +23,7 @@
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
- $(GALLIUM_CFLAGS) \
- $(PTHREAD_CFLAGS) \
- $(LIBDRM_CFLAGS) \
- $(VISIBILITY_CFLAGS)
-AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gallium/drivers \
- -I$(top_srcdir)/src/gallium/winsys
+ $(GALLIUM_VIDEO_CFLAGS)
vdpaudir = $(VDPAU_LIB_INSTALL_DIR)
vdpau_LTLIBRARIES = libvdpau_radeonsi.la
diff --git a/src/gallium/targets/vdpau-nouveau/Makefile.am b/src/gallium/targets/vdpau-nouveau/Makefile.am
index cff6095..e23d160 100644
--- a/src/gallium/targets/vdpau-nouveau/Makefile.am
+++ b/src/gallium/targets/vdpau-nouveau/Makefile.am
@@ -23,12 +23,7 @@
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
- $(GALLIUM_CFLAGS) \
- $(PTHREAD_CFLAGS) \
- $(LIBDRM_CFLAGS)
-AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gallium/drivers \
- -I$(top_srcdir)/src/gallium/winsys
+ $(GALLIUM_VIDEO_CFLAGS)
vdpaudir = $(VDPAU_LIB_INSTALL_DIR)
vdpau_LTLIBRARIES = libvdpau_nouveau.la
diff --git a/src/gallium/targets/vdpau-softpipe/Makefile.am b/src/gallium/targets/vdpau-softpipe/Makefile.am
index fd103dd..20f001b 100644
--- a/src/gallium/targets/vdpau-softpipe/Makefile.am
+++ b/src/gallium/targets/vdpau-softpipe/Makefile.am
@@ -23,13 +23,9 @@
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
- $(GALLIUM_CFLAGS) \
- $(PTHREAD_CFLAGS) \
- $(LIBDRM_CFLAGS)
+ $(GALLIUM_VIDEO_CFLAGS)
AM_CPPFLAGS = \
- -DGALLIUM_SOFTPIPE \
- -I$(top_srcdir)/src/gallium/drivers \
- -I$(top_srcdir)/src/gallium/winsys
+ -DGALLIUM_SOFTPIPE
vdpaudir = $(VDPAU_LIB_INSTALL_DIR)
vdpau_LTLIBRARIES = libvdpau_softpipe.la
--
1.8.4.2
More information about the mesa-dev
mailing list