[Mesa-dev] [PATCH 09/29] automake: compact gallium/drivers and gallium/winsys makefiles

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 29 15:54:21 PDT 2014


Rather than having two separate almost empty and identical makefiles,
compact them thus improving the configure and build time.
Additionally this makes the automake build symmetrical to the scons
and android one.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 configure.ac                    |   3 +-
 src/Makefile.am                 |   3 +-
 src/gallium/Makefile.am         | 104 ++++++++++++++++++++++++++++++++++++++++
 src/gallium/drivers/Makefile.am |  92 -----------------------------------
 src/gallium/winsys/Makefile.am  |  73 ----------------------------
 5 files changed, 106 insertions(+), 169 deletions(-)
 create mode 100644 src/gallium/Makefile.am
 delete mode 100644 src/gallium/drivers/Makefile.am
 delete mode 100644 src/gallium/winsys/Makefile.am

diff --git a/configure.ac b/configure.ac
index dd3366b..acbfe8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2172,9 +2172,9 @@ AC_CONFIG_FILES([Makefile
 		src/egl/wayland/wayland-drm/Makefile
 		src/egl/wayland/wayland-egl/Makefile
 		src/egl/wayland/wayland-egl/wayland-egl.pc
+		src/gallium/Makefile
 		src/gallium/auxiliary/Makefile
 		src/gallium/auxiliary/pipe-loader/Makefile
-		src/gallium/drivers/Makefile
 		src/gallium/drivers/freedreno/Makefile
 		src/gallium/drivers/galahad/Makefile
 		src/gallium/drivers/i915/Makefile
@@ -2219,7 +2219,6 @@ AC_CONFIG_FILES([Makefile
 		src/gallium/targets/xvmc/Makefile
 		src/gallium/tests/trivial/Makefile
 		src/gallium/tests/unit/Makefile
-		src/gallium/winsys/Makefile
 		src/gallium/winsys/freedreno/drm/Makefile
 		src/gallium/winsys/i915/drm/Makefile
 		src/gallium/winsys/intel/drm/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index d4a7090..e25a7c7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -50,9 +50,8 @@ endif
 if HAVE_GALLIUM
 SUBDIRS +=			\
 	gallium/auxiliary	\
-	gallium/drivers		\
+	gallium			\
 	gallium/state_trackers	\
-	gallium/winsys		\
 	gallium/targets
 
 if HAVE_GALLIUM_TESTS
diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am
new file mode 100644
index 0000000..03d469d
--- /dev/null
+++ b/src/gallium/Makefile.am
@@ -0,0 +1,104 @@
+SUBDIRS =
+
+##
+## Gallium pipe drivers and their respective winsys'
+##
+
+SUBDIRS += \
+	drivers/galahad \
+	drivers/identity \
+	drivers/noop \
+	drivers/trace \
+	drivers/rbug
+
+## freedreno/msm/kgsl
+if HAVE_GALLIUM_FREEDRENO
+SUBDIRS += drivers/freedreno
+SUBDIRS += winsys/freedreno/drm
+endif
+
+## i915g/i915
+if HAVE_GALLIUM_I915
+SUBDIRS += drivers/i915
+SUBDIRS += winsys/i915/drm
+endif
+
+## ilo/i965
+if HAVE_GALLIUM_ILO
+SUBDIRS += drivers/ilo
+SUBDIRS += winsys/intel/drm
+endif
+
+## nouveau
+if HAVE_GALLIUM_NOUVEAU
+SUBDIRS += drivers/nouveau
+SUBDIRS += winsys/nouveau/drm
+endif
+
+## vmwgfx/svga
+if HAVE_GALLIUM_SVGA
+SUBDIRS += drivers/svga
+SUBDIRS += winsys/svga/drm
+endif
+
+## r300
+if HAVE_GALLIUM_R300
+SUBDIRS += drivers/r300
+endif
+
+## radeon - linked into r600 and radeonsi
+if HAVE_GALLIUM_RADEON_COMMON
+SUBDIRS += drivers/radeon
+endif
+
+## r600
+if HAVE_GALLIUM_R600
+SUBDIRS += drivers/r600
+endif
+
+## radeonsi
+if HAVE_GALLIUM_RADEONSI
+SUBDIRS += drivers/radeonsi
+endif
+
+## the radeon winsys - linked in by r300, r600 and radeonsi
+if NEED_RADEON_DRM_WINSYS
+SUBDIRS += winsys/radeon/drm
+endif
+
+## swrast/softpipe
+if NEED_GALLIUM_SOFTPIPE_DRIVER
+SUBDIRS += drivers/softpipe
+
+## swrast/llvmpipe
+if NEED_GALLIUM_LLVMPIPE_DRIVER
+SUBDIRS += drivers/llvmpipe
+endif
+endif
+
+## the sw winsys'
+SUBDIRS += winsys/sw/null
+
+if NEED_WINSYS_XLIB
+SUBDIRS += winsys/sw/xlib
+endif
+
+if HAVE_DRISW
+SUBDIRS += winsys/sw/dri
+endif
+
+if HAVE_DRI2
+SUBDIRS += winsys/sw/kms-dri
+endif
+
+if HAVE_EGL_PLATFORM_FBDEV
+SUBDIRS += winsys/sw/fbdev
+endif
+
+if HAVE_EGL_PLATFORM_WAYLAND
+SUBDIRS += winsys/sw/wayland
+endif
+
+if NEED_WINSYS_WRAPPER
+SUBDIRS += winsys/sw/wrapper
+endif
diff --git a/src/gallium/drivers/Makefile.am b/src/gallium/drivers/Makefile.am
deleted file mode 100644
index 3d53cad..0000000
--- a/src/gallium/drivers/Makefile.am
+++ /dev/null
@@ -1,92 +0,0 @@
-AUTOMAKE_OPTIONS = subdir-objects
-
-
-SUBDIRS = . galahad identity noop trace rbug
-
-################################################################################
-
-if HAVE_GALLIUM_FREEDRENO
-
-SUBDIRS += freedreno
-
-endif
-
-################################################################################
-
-if HAVE_GALLIUM_I915
-
-SUBDIRS += i915
-
-endif
-
-################################################################################
-
-if HAVE_GALLIUM_ILO
-
-SUBDIRS += ilo
-
-endif
-
-################################################################################
-
-if HAVE_GALLIUM_NOUVEAU
-
-SUBDIRS += nouveau
-
-endif
-
-################################################################################
-
-if HAVE_GALLIUM_SVGA
-
-SUBDIRS += svga
-
-endif
-
-################################################################################
-
-if HAVE_GALLIUM_RADEON_COMMON
-
-SUBDIRS += radeon
-
-endif
-
-################################################################################
-
-if HAVE_GALLIUM_R300
-
-SUBDIRS += r300
-
-endif
-
-################################################################################
-
-if HAVE_GALLIUM_R600
-
-SUBDIRS += r600
-
-endif
-
-################################################################################
-
-if HAVE_GALLIUM_RADEONSI
-
-SUBDIRS += radeonsi
-
-endif
-
-################################################################################
-
-if NEED_GALLIUM_SOFTPIPE_DRIVER
-
-SUBDIRS += softpipe
-
-endif
-
-################################################################################
-
-if NEED_GALLIUM_LLVMPIPE_DRIVER
-
-SUBDIRS += llvmpipe
-
-endif
diff --git a/src/gallium/winsys/Makefile.am b/src/gallium/winsys/Makefile.am
deleted file mode 100644
index 4c01afd..0000000
--- a/src/gallium/winsys/Makefile.am
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright © 2013 Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-SUBDIRS = sw/null
-
-if NEED_WINSYS_XLIB
-SUBDIRS += sw/xlib
-endif
-
-if HAVE_DRISW
-SUBDIRS += sw/dri
-endif
-
-if HAVE_DRI2
-SUBDIRS += sw/kms-dri
-endif
-
-if HAVE_EGL_PLATFORM_FBDEV
-SUBDIRS += sw/fbdev
-endif
-
-if HAVE_EGL_PLATFORM_WAYLAND
-SUBDIRS += sw/wayland
-endif
-
-if NEED_WINSYS_WRAPPER
-SUBDIRS += sw/wrapper
-endif
-
-if NEED_NONNULL_WINSYS
-if HAVE_GALLIUM_FREEDRENO
-SUBDIRS += freedreno/drm
-endif
-
-if HAVE_GALLIUM_I915
-SUBDIRS += i915/drm
-endif
-
-if HAVE_GALLIUM_ILO
-SUBDIRS += intel/drm
-endif
-
-if HAVE_GALLIUM_NOUVEAU
-SUBDIRS += nouveau/drm
-endif
-
-if NEED_RADEON_DRM_WINSYS
-SUBDIRS += radeon/drm
-endif
-
-if HAVE_GALLIUM_SVGA
-SUBDIRS += svga/drm
-endif
-endif
-- 
2.0.2



More information about the mesa-dev mailing list