[Mesa-dev] [PATCH 21/27] gallium/winsys: compact compiler flags into Automake.inc

Emil Velikov emil.l.velikov at gmail.com
Mon Nov 11 10:54:00 PST 2013


Cleanup the duplicating flags and consolidate into a sigle variable.

Note: this patch adds VISIBILITY_CFLAGS to the following targets
* freedreno/drm
* i915/{drm,sw}
* nouveau/drm
* sw/fbdev
* sw/null
* sw/wayland
* sw/wrapper
* sw/xlib

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/Automake.inc                     | 6 ++++++
 src/gallium/winsys/freedreno/drm/Makefile.am | 2 +-
 src/gallium/winsys/i915/drm/Makefile.am      | 3 +--
 src/gallium/winsys/i915/sw/Makefile.am       | 3 +--
 src/gallium/winsys/intel/drm/Makefile.am     | 5 ++---
 src/gallium/winsys/nouveau/drm/Makefile.am   | 3 +--
 src/gallium/winsys/radeon/drm/Makefile.am    | 6 ++----
 src/gallium/winsys/svga/drm/Makefile.am      | 7 ++-----
 src/gallium/winsys/sw/dri/Makefile.am        | 5 ++---
 src/gallium/winsys/sw/fbdev/Makefile.am      | 4 ++--
 src/gallium/winsys/sw/null/Makefile.am       | 4 ++--
 src/gallium/winsys/sw/wayland/Makefile.am    | 4 ++--
 src/gallium/winsys/sw/wrapper/Makefile.am    | 4 ++--
 src/gallium/winsys/sw/xlib/Makefile.am       | 4 ++--
 14 files changed, 28 insertions(+), 32 deletions(-)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 86e9b1e..f67b295 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -50,3 +50,9 @@ GALLIUM_VDPAU_LIB_DEPS = \
 	$(VDPAU_LIBS) \
 	$(LIBDRM_LIBS)
 
+GALLIUM_WINSYS_CFLAGS = \
+	-I$(top_srcdir)/include \
+	-I$(top_srcdir)/src/gallium/include \
+	-I$(top_srcdir)/src/gallium/auxiliary \
+	$(DEFINES) \
+	$(VISIBILITY_CFLAGS)
diff --git a/src/gallium/winsys/freedreno/drm/Makefile.am b/src/gallium/winsys/freedreno/drm/Makefile.am
index 8a74dcd..cf4c24c 100644
--- a/src/gallium/winsys/freedreno/drm/Makefile.am
+++ b/src/gallium/winsys/freedreno/drm/Makefile.am
@@ -25,7 +25,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
 	-I$(top_srcdir)/src/gallium/drivers \
-	$(GALLIUM_CFLAGS) \
+	$(GALLIUM_WINSYS_CFLAGS) \
 	$(FREEDRENO_CFLAGS)
 
 noinst_LTLIBRARIES = libfreedrenodrm.la
diff --git a/src/gallium/winsys/i915/drm/Makefile.am b/src/gallium/winsys/i915/drm/Makefile.am
index 7a64925..82c477d 100644
--- a/src/gallium/winsys/i915/drm/Makefile.am
+++ b/src/gallium/winsys/i915/drm/Makefile.am
@@ -24,9 +24,8 @@ include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
-	-I$(top_srcdir)/include \
 	-I$(top_srcdir)/src/gallium/drivers \
-	$(GALLIUM_CFLAGS) \
+	$(GALLIUM_WINSYS_CFLAGS) \
 	$(INTEL_CFLAGS)
 
 noinst_LTLIBRARIES = libi915drm.la
diff --git a/src/gallium/winsys/i915/sw/Makefile.am b/src/gallium/winsys/i915/sw/Makefile.am
index 186fee3..39f6022 100644
--- a/src/gallium/winsys/i915/sw/Makefile.am
+++ b/src/gallium/winsys/i915/sw/Makefile.am
@@ -24,9 +24,8 @@ include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
-	-I$(top_srcdir)/include \
 	-I$(top_srcdir)/src/gallium/drivers \
-	$(GALLIUM_CFLAGS) \
+	$(GALLIUM_WINSYS_CFLAGS) \
 	$(INTEL_CFLAGS)
 
 noinst_LTLIBRARIES = libi915sw.la
diff --git a/src/gallium/winsys/intel/drm/Makefile.am b/src/gallium/winsys/intel/drm/Makefile.am
index 3c4a271..30f4486 100644
--- a/src/gallium/winsys/intel/drm/Makefile.am
+++ b/src/gallium/winsys/intel/drm/Makefile.am
@@ -25,9 +25,8 @@ include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
-	$(GALLIUM_CFLAGS) \
-	$(INTEL_CFLAGS) \
-	$(VISIBILITY_CFLAGS)
+	$(GALLIUM_WINSYS_CFLAGS) \
+	$(INTEL_CFLAGS)
 
 noinst_LTLIBRARIES = libintelwinsys.la
 
diff --git a/src/gallium/winsys/nouveau/drm/Makefile.am b/src/gallium/winsys/nouveau/drm/Makefile.am
index f9645f5..9c94ea4 100644
--- a/src/gallium/winsys/nouveau/drm/Makefile.am
+++ b/src/gallium/winsys/nouveau/drm/Makefile.am
@@ -24,9 +24,8 @@ include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
-	-I$(top_srcdir)/include \
 	-I$(top_srcdir)/src/gallium/drivers \
-	$(GALLIUM_CFLAGS) \
+	$(GALLIUM_WINSYS_CFLAGS) \
 	$(NOUVEAU_CFLAGS)
 
 noinst_LTLIBRARIES = libnouveaudrm.la
diff --git a/src/gallium/winsys/radeon/drm/Makefile.am b/src/gallium/winsys/radeon/drm/Makefile.am
index d5c5474..b413b0b 100644
--- a/src/gallium/winsys/radeon/drm/Makefile.am
+++ b/src/gallium/winsys/radeon/drm/Makefile.am
@@ -2,10 +2,8 @@ include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
-	-I$(top_srcdir)/include \
-	$(GALLIUM_CFLAGS) \
-	$(RADEON_CFLAGS) \
-	$(VISIBILITY_CFLAGS)
+	$(GALLIUM_WINSYS_CFLAGS) \
+	$(RADEON_CFLAGS)
 
 noinst_LTLIBRARIES = libradeonwinsys.la
 
diff --git a/src/gallium/winsys/svga/drm/Makefile.am b/src/gallium/winsys/svga/drm/Makefile.am
index d7ada3c..69398b8 100644
--- a/src/gallium/winsys/svga/drm/Makefile.am
+++ b/src/gallium/winsys/svga/drm/Makefile.am
@@ -23,16 +23,13 @@
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CPPFLAGS = \
+AM_CFLAGS = \
 	-I$(top_srcdir)/src/gallium/drivers/svga \
 	-I$(top_srcdir)/src/gallium/drivers/svga/include \
-	-I$(top_srcdir)/include \
 	-I$(top_srcdir)/src/gallium/drivers \
-	$(GALLIUM_CFLAGS) \
+	$(GALLIUM_WINSYS_CFLAGS) \
 	$(LIBDRM_CFLAGS)
 
-AM_CFLAGS = $(VISIBILITY_CFLAGS)
-
 #On some systems -std= must be added to CFLAGS to be the last -std=
 CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64
 
diff --git a/src/gallium/winsys/sw/dri/Makefile.am b/src/gallium/winsys/sw/dri/Makefile.am
index d987c15..182825e 100644
--- a/src/gallium/winsys/sw/dri/Makefile.am
+++ b/src/gallium/winsys/sw/dri/Makefile.am
@@ -22,9 +22,8 @@
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CPPFLAGS = \
-	$(GALLIUM_CFLAGS) \
-	$(VISIBILITY_CFLAGS)
+AM_CFLAGS = \
+	$(GALLIUM_WINSYS_CFLAGS)
 
 noinst_LTLIBRARIES = libswdri.la
 
diff --git a/src/gallium/winsys/sw/fbdev/Makefile.am b/src/gallium/winsys/sw/fbdev/Makefile.am
index 801f689..93abe81 100644
--- a/src/gallium/winsys/sw/fbdev/Makefile.am
+++ b/src/gallium/winsys/sw/fbdev/Makefile.am
@@ -22,8 +22,8 @@
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CPPFLAGS = \
-	$(GALLIUM_CFLAGS)
+AM_CFLAGS = \
+	$(GALLIUM_WINSYS_CFLAGS)
 
 noinst_LTLIBRARIES = libfbdev.la
 
diff --git a/src/gallium/winsys/sw/null/Makefile.am b/src/gallium/winsys/sw/null/Makefile.am
index fb450dd..17b52cc 100644
--- a/src/gallium/winsys/sw/null/Makefile.am
+++ b/src/gallium/winsys/sw/null/Makefile.am
@@ -22,8 +22,8 @@
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CPPFLAGS = \
-	$(GALLIUM_CFLAGS)
+AM_CFLAGS = \
+	$(GALLIUM_WINSYS_CFLAGS)
 
 noinst_LTLIBRARIES = libws_null.la
 
diff --git a/src/gallium/winsys/sw/wayland/Makefile.am b/src/gallium/winsys/sw/wayland/Makefile.am
index 40ec7d9..0cb47a1 100644
--- a/src/gallium/winsys/sw/wayland/Makefile.am
+++ b/src/gallium/winsys/sw/wayland/Makefile.am
@@ -22,8 +22,8 @@
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CPPFLAGS = \
-	$(GALLIUM_CFLAGS) \
+AM_CFLAGS = \
+	$(GALLIUM_WINSYS_CFLAGS) \
 	$(WAYLAND_CFLAGS)
 
 noinst_LTLIBRARIES = libws_wayland.la
diff --git a/src/gallium/winsys/sw/wrapper/Makefile.am b/src/gallium/winsys/sw/wrapper/Makefile.am
index 3dcd6ad..d8bbd9e 100644
--- a/src/gallium/winsys/sw/wrapper/Makefile.am
+++ b/src/gallium/winsys/sw/wrapper/Makefile.am
@@ -22,8 +22,8 @@
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CPPFLAGS = \
-	$(GALLIUM_CFLAGS)
+AM_CFLAGS = \
+	$(GALLIUM_WINSYS_CFLAGS)
 
 noinst_LTLIBRARIES = libwsw.la
 
diff --git a/src/gallium/winsys/sw/xlib/Makefile.am b/src/gallium/winsys/sw/xlib/Makefile.am
index ea6b742..a38189c 100644
--- a/src/gallium/winsys/sw/xlib/Makefile.am
+++ b/src/gallium/winsys/sw/xlib/Makefile.am
@@ -22,8 +22,8 @@
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CPPFLAGS = \
-	$(GALLIUM_CFLAGS) \
+AM_CFLAGS = \
+	$(GALLIUM_WINSYS_CFLAGS) \
 	$(X11_INCLUDES)
 
 noinst_LTLIBRARIES = libws_xlib.la
-- 
1.8.4.2



More information about the mesa-dev mailing list