[Mesa-dev] [PATCH 09/22] winsys/sw: automake: consistently use Makefile.sources

Emil Velikov emil.l.velikov at gmail.com
Mon Aug 18 16:20:46 PDT 2014


 - Include the headers within.
 - Update scons to use them.
 - Drop useless include (gallium/drivers) from scons.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/winsys/sw/dri/Makefile.am          | 3 ++-
 src/gallium/winsys/sw/dri/Makefile.sources     | 3 +++
 src/gallium/winsys/sw/dri/SConscript           | 5 +----
 src/gallium/winsys/sw/fbdev/Makefile.am        | 3 ++-
 src/gallium/winsys/sw/fbdev/Makefile.sources   | 3 +++
 src/gallium/winsys/sw/fbdev/SConscript         | 5 +----
 src/gallium/winsys/sw/kms-dri/Makefile.am      | 3 ++-
 src/gallium/winsys/sw/kms-dri/Makefile.sources | 3 +++
 src/gallium/winsys/sw/kms-dri/SConscript       | 5 +----
 src/gallium/winsys/sw/null/Makefile.am         | 3 ++-
 src/gallium/winsys/sw/null/Makefile.sources    | 3 +++
 src/gallium/winsys/sw/null/SConscript          | 5 +----
 src/gallium/winsys/sw/wayland/Makefile.am      | 3 ++-
 src/gallium/winsys/sw/wayland/Makefile.sources | 3 +++
 src/gallium/winsys/sw/wrapper/Makefile.am      | 3 ++-
 src/gallium/winsys/sw/wrapper/Makefile.sources | 3 +++
 src/gallium/winsys/sw/wrapper/SConscript       | 5 +----
 src/gallium/winsys/sw/xlib/Makefile.am         | 3 ++-
 src/gallium/winsys/sw/xlib/Makefile.sources    | 3 +++
 src/gallium/winsys/sw/xlib/SConscript          | 5 +----
 20 files changed, 41 insertions(+), 31 deletions(-)
 create mode 100644 src/gallium/winsys/sw/dri/Makefile.sources
 create mode 100644 src/gallium/winsys/sw/fbdev/Makefile.sources
 create mode 100644 src/gallium/winsys/sw/kms-dri/Makefile.sources
 create mode 100644 src/gallium/winsys/sw/null/Makefile.sources
 create mode 100644 src/gallium/winsys/sw/wayland/Makefile.sources
 create mode 100644 src/gallium/winsys/sw/wrapper/Makefile.sources
 create mode 100644 src/gallium/winsys/sw/xlib/Makefile.sources

diff --git a/src/gallium/winsys/sw/dri/Makefile.am b/src/gallium/winsys/sw/dri/Makefile.am
index 182825e..1917b00 100644
--- a/src/gallium/winsys/sw/dri/Makefile.am
+++ b/src/gallium/winsys/sw/dri/Makefile.am
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
@@ -27,4 +28,4 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libswdri.la
 
-libswdri_la_SOURCES = dri_sw_winsys.c
+libswdri_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/winsys/sw/dri/Makefile.sources b/src/gallium/winsys/sw/dri/Makefile.sources
new file mode 100644
index 0000000..5f9178f
--- /dev/null
+++ b/src/gallium/winsys/sw/dri/Makefile.sources
@@ -0,0 +1,3 @@
+C_SOURCES := \
+	dri_sw_winsys.c \
+	dri_sw_winsys.h
diff --git a/src/gallium/winsys/sw/dri/SConscript b/src/gallium/winsys/sw/dri/SConscript
index f8e1fa6..434d13b 100644
--- a/src/gallium/winsys/sw/dri/SConscript
+++ b/src/gallium/winsys/sw/dri/SConscript
@@ -11,13 +11,10 @@ if env['platform'] in ('linux', 'sunos'):
     env.Append(CPPPATH = [
         '#/src/gallium/include',
         '#/src/gallium/auxiliary',
-        '#/src/gallium/drivers',
     ])
 
     ws_dri = env.ConvenienceLibrary(
         target = 'ws_dri',
-        source = [
-           'dri_sw_winsys.c',
-        ]
+        source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
     )
     Export('ws_dri')
diff --git a/src/gallium/winsys/sw/fbdev/Makefile.am b/src/gallium/winsys/sw/fbdev/Makefile.am
index 93abe81..2953376 100644
--- a/src/gallium/winsys/sw/fbdev/Makefile.am
+++ b/src/gallium/winsys/sw/fbdev/Makefile.am
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
@@ -27,4 +28,4 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libfbdev.la
 
-libfbdev_la_SOURCES = fbdev_sw_winsys.c
+libfbdev_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/winsys/sw/fbdev/Makefile.sources b/src/gallium/winsys/sw/fbdev/Makefile.sources
new file mode 100644
index 0000000..dd48051
--- /dev/null
+++ b/src/gallium/winsys/sw/fbdev/Makefile.sources
@@ -0,0 +1,3 @@
+C_SOURCES := \
+	fbdev_sw_winsys.c \
+	fbdev_sw_winsys.h
diff --git a/src/gallium/winsys/sw/fbdev/SConscript b/src/gallium/winsys/sw/fbdev/SConscript
index 3b5b4ff..bf504ad 100644
--- a/src/gallium/winsys/sw/fbdev/SConscript
+++ b/src/gallium/winsys/sw/fbdev/SConscript
@@ -11,13 +11,10 @@ if env['platform'] == 'linux':
     env.Append(CPPPATH = [
         '#/src/gallium/include',
         '#/src/gallium/auxiliary',
-        '#/src/gallium/drivers',
     ])
 
     ws_fbdev = env.ConvenienceLibrary(
         target = 'ws_fbdev',
-        source = [
-           'fbdev_sw_winsys.c',
-        ]
+        source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
     )
     Export('ws_fbdev')
diff --git a/src/gallium/winsys/sw/kms-dri/Makefile.am b/src/gallium/winsys/sw/kms-dri/Makefile.am
index cb3b61d..8162553 100644
--- a/src/gallium/winsys/sw/kms-dri/Makefile.am
+++ b/src/gallium/winsys/sw/kms-dri/Makefile.am
@@ -21,6 +21,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
@@ -29,4 +30,4 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libswkmsdri.la
 
-libswkmsdri_la_SOURCES = kms_dri_sw_winsys.c
+libswkmsdri_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/winsys/sw/kms-dri/Makefile.sources b/src/gallium/winsys/sw/kms-dri/Makefile.sources
new file mode 100644
index 0000000..4bf832b
--- /dev/null
+++ b/src/gallium/winsys/sw/kms-dri/Makefile.sources
@@ -0,0 +1,3 @@
+C_SOURCES := \
+	kms_dri_sw_winsys.c \
+	kms_dri_sw_winsys.h
diff --git a/src/gallium/winsys/sw/kms-dri/SConscript b/src/gallium/winsys/sw/kms-dri/SConscript
index 0a6c335..e7dd721 100644
--- a/src/gallium/winsys/sw/kms-dri/SConscript
+++ b/src/gallium/winsys/sw/kms-dri/SConscript
@@ -12,15 +12,12 @@ env = env.Clone()
 env.PkgUseModules('DRM')
 
 env.Append(CPPPATH = [
-#    'include',
     '#/src/gallium/include',
     '#/src/gallium/auxiliary',
 ])
 
 ws_kms_dri = env.ConvenienceLibrary(
     target = 'ws_kms_dri',
-    source = [
-       'kms_dri_sw_winsys.c',
-    ]
+    source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
 )
 Export('ws_kms_dri')
diff --git a/src/gallium/winsys/sw/null/Makefile.am b/src/gallium/winsys/sw/null/Makefile.am
index 17b52cc..5446623 100644
--- a/src/gallium/winsys/sw/null/Makefile.am
+++ b/src/gallium/winsys/sw/null/Makefile.am
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
@@ -27,4 +28,4 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libws_null.la
 
-libws_null_la_SOURCES = null_sw_winsys.c
+libws_null_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/winsys/sw/null/Makefile.sources b/src/gallium/winsys/sw/null/Makefile.sources
new file mode 100644
index 0000000..b72310b
--- /dev/null
+++ b/src/gallium/winsys/sw/null/Makefile.sources
@@ -0,0 +1,3 @@
+C_SOURCES := \
+	null_sw_winsys.c \
+	null_sw_winsys.h
diff --git a/src/gallium/winsys/sw/null/SConscript b/src/gallium/winsys/sw/null/SConscript
index b7176e0..6236498 100644
--- a/src/gallium/winsys/sw/null/SConscript
+++ b/src/gallium/winsys/sw/null/SConscript
@@ -9,14 +9,11 @@ env = env.Clone()
 env.Append(CPPPATH = [
     '#/src/gallium/include',
     '#/src/gallium/auxiliary',
-    '#/src/gallium/drivers',
 ])
 
 ws_null = env.ConvenienceLibrary(
     target = 'ws_null',
-    source = [
-       'null_sw_winsys.c',
-    ]
+    source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
 )
 env.Alias('ws_null', ws_null)
 Export('ws_null')
diff --git a/src/gallium/winsys/sw/wayland/Makefile.am b/src/gallium/winsys/sw/wayland/Makefile.am
index 0cb47a1..443ff19 100644
--- a/src/gallium/winsys/sw/wayland/Makefile.am
+++ b/src/gallium/winsys/sw/wayland/Makefile.am
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
@@ -28,4 +29,4 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libws_wayland.la
 
-libws_wayland_la_SOURCES = wayland_sw_winsys.c
+libws_wayland_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/winsys/sw/wayland/Makefile.sources b/src/gallium/winsys/sw/wayland/Makefile.sources
new file mode 100644
index 0000000..570ccc6
--- /dev/null
+++ b/src/gallium/winsys/sw/wayland/Makefile.sources
@@ -0,0 +1,3 @@
+C_SOURCES := \
+	wayland_sw_winsys.c \
+	wayland_sw_winsys.h
diff --git a/src/gallium/winsys/sw/wrapper/Makefile.am b/src/gallium/winsys/sw/wrapper/Makefile.am
index d8bbd9e..4b30c44 100644
--- a/src/gallium/winsys/sw/wrapper/Makefile.am
+++ b/src/gallium/winsys/sw/wrapper/Makefile.am
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
@@ -27,4 +28,4 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libwsw.la
 
-libwsw_la_SOURCES = wrapper_sw_winsys.c
+libwsw_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/winsys/sw/wrapper/Makefile.sources b/src/gallium/winsys/sw/wrapper/Makefile.sources
new file mode 100644
index 0000000..742e49b
--- /dev/null
+++ b/src/gallium/winsys/sw/wrapper/Makefile.sources
@@ -0,0 +1,3 @@
+C_SOURCES := \
+	wrapper_sw_winsys.c \
+	wrapper_sw_winsys.h
diff --git a/src/gallium/winsys/sw/wrapper/SConscript b/src/gallium/winsys/sw/wrapper/SConscript
index 4c60488..9ff9bf6 100644
--- a/src/gallium/winsys/sw/wrapper/SConscript
+++ b/src/gallium/winsys/sw/wrapper/SConscript
@@ -9,13 +9,10 @@ env = env.Clone()
 env.Append(CPPPATH = [
     '#/src/gallium/include',
     '#/src/gallium/auxiliary',
-    '#/src/gallium/drivers',
 ])
 
 ws_wrapper = env.ConvenienceLibrary(
     target = 'ws_wrapper',
-    source = [
-       'wrapper_sw_winsys.c',
-    ]
+    source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
 )
 Export('ws_wrapper')
diff --git a/src/gallium/winsys/sw/xlib/Makefile.am b/src/gallium/winsys/sw/xlib/Makefile.am
index a38189c..825a8fd 100644
--- a/src/gallium/winsys/sw/xlib/Makefile.am
+++ b/src/gallium/winsys/sw/xlib/Makefile.am
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
@@ -28,4 +29,4 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libws_xlib.la
 
-libws_xlib_la_SOURCES = xlib_sw_winsys.c
+libws_xlib_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/winsys/sw/xlib/Makefile.sources b/src/gallium/winsys/sw/xlib/Makefile.sources
new file mode 100644
index 0000000..fc6a56d
--- /dev/null
+++ b/src/gallium/winsys/sw/xlib/Makefile.sources
@@ -0,0 +1,3 @@
+C_SOURCES := \
+	xlib_sw_winsys.c \
+	xlib_sw_winsys.h
diff --git a/src/gallium/winsys/sw/xlib/SConscript b/src/gallium/winsys/sw/xlib/SConscript
index 3a8c75d..64db201 100644
--- a/src/gallium/winsys/sw/xlib/SConscript
+++ b/src/gallium/winsys/sw/xlib/SConscript
@@ -11,14 +11,11 @@ if env['platform'] in ('cygwin', 'darwin', 'freebsd', 'linux', 'sunos'):
     env.Append(CPPPATH = [
         '#/src/gallium/include',
         '#/src/gallium/auxiliary',
-        '#/src/gallium/drivers',
     ])
 
     ws_xlib = env.ConvenienceLibrary(
         target = 'ws_xlib',
-        source = [
-           'xlib_sw_winsys.c',
-        ]
+        source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
     )
     env.Alias('ws_xlib', ws_xlib)
     Export('ws_xlib')
-- 
2.0.2



More information about the mesa-dev mailing list