[Mesa-dev] [PATCH 15/18] build: Get rid of GALLIUM_MAKE_DIRS

Matt Turner mattst88 at gmail.com
Sun Mar 10 20:24:56 PDT 2013


---
 configure.ac                                |   31 +++--------
 src/gallium/drivers/Makefile.am             |   76 ++++++++++++++++++++++-----
 src/gallium/targets/pipe-loader/Makefile.am |    6 +--
 3 files changed, 70 insertions(+), 43 deletions(-)

diff --git a/configure.ac b/configure.ac
index 134369d..8d74466 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1896,6 +1896,13 @@ AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
 
+AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test "x$HAVE_GALLIUM_SVGA" = xyes -o \
+                                                  "x$HAVE_GALLIUM_I915" = xyes -o \
+                                                  "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
+AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_I915" = xyes -o \
+                                                  "x$HAVE_GALLIUM_SOFTPIPE" = xyes -a \
+                                                  "x$MESA_LLVM" = x1)
+
 if test "x$enable_gallium_loader" = xyes; then
     GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
     GALLIUM_PIPE_LOADER_DEFINES="-DHAVE_PIPE_LOADER_SW"
@@ -1921,24 +1928,6 @@ if test "x$enable_gallium_loader" = xyes; then
     AC_SUBST([GALLIUM_PIPE_LOADER_LIBS])
 fi
 
-dnl Tell Automake which drivers to build
-for driver in $GALLIUM_DRIVERS_DIRS; do
-    case "x$driver" in
-        xgalahad)
-            HAVE_GALAHAD_GALLIUM=yes;
-	    ;;
-	xidentity)
-	    HAVE_IDENTITY_GALLIUM=yes;
-	    ;;
-	xnoop)
-	    HAVE_NOOP_GALLIUM=yes;
-	    ;;
-        *)
-            GALLIUM_MAKE_DIRS="$GALLIUM_MAKE_DIRS $driver"
-	    ;;
-    esac
-done
-
 AM_CONDITIONAL(HAVE_I915_DRI, test x$HAVE_I915_DRI = xyes)
 AM_CONDITIONAL(HAVE_I965_DRI, test x$HAVE_I965_DRI = xyes)
 AM_CONDITIONAL(HAVE_NOUVEAU_DRI, test x$HAVE_NOUVEAU_DRI = xyes)
@@ -1947,9 +1936,6 @@ AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
 AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
 AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes)
 
-AM_CONDITIONAL(HAVE_GALAHAD_GALLIUM, test x$HAVE_GALAHAD_GALLIUM = xyes)
-AM_CONDITIONAL(HAVE_IDENTITY_GALLIUM, test x$HAVE_IDENTITY_GALLIUM = xyes)
-AM_CONDITIONAL(HAVE_NOOP_GALLIUM, test x$HAVE_NOOP_GALLIUM = xyes)
 AM_CONDITIONAL(NEED_RADEON_GALLIUM, test x$NEED_RADEON_GALLIUM = xyes)
 AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_NEED_RADEON_GALLIUM = xyes)
 AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
@@ -1959,8 +1945,6 @@ AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
 AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
 AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
 
-AC_SUBST([GALLIUM_MAKE_DIRS])
-
 AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \
                                      "x$enable_xlib_glx" = xyes -o \
                                      "x$enable_osmesa" = xyes)
@@ -2123,7 +2107,6 @@ dnl Sort the dirs alphabetically
 GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
 GALLIUM_WINSYS_DIRS=`echo $GALLIUM_WINSYS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
 GALLIUM_DRIVERS_DIRS=`echo $GALLIUM_DRIVERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
-GALLIUM_MAKE_DIRS=`echo $GALLIUM_MAKE_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
 GALLIUM_STATE_TRACKERS_DIRS=`echo $GALLIUM_STATE_TRACKERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
 
 AC_OUTPUT
diff --git a/src/gallium/drivers/Makefile.am b/src/gallium/drivers/Makefile.am
index 25d9533..ff2f353 100644
--- a/src/gallium/drivers/Makefile.am
+++ b/src/gallium/drivers/Makefile.am
@@ -10,12 +10,10 @@ AM_CFLAGS = $(VISIBILITY_CFLAGS)
 
 noinst_LTLIBRARIES =
 
-SUBDIRS = .
+SUBDIRS = . trace rbug
 
 ################################################################################
 
-if HAVE_GALAHAD_GALLIUM
-
 noinst_LTLIBRARIES += galahad/libgalahad.la
 
 galahad_libgalahad_la_SOURCES = \
@@ -23,12 +21,8 @@ galahad_libgalahad_la_SOURCES = \
 	galahad/glhd_context.c \
 	galahad/glhd_screen.c
 
-endif
-
 ################################################################################
 
-if HAVE_IDENTITY_GALLIUM
-
 noinst_LTLIBRARIES += identity/libidentity.la
 
 identity_libidentity_la_SOURCES = \
@@ -36,12 +30,8 @@ identity_libidentity_la_SOURCES = \
 	identity/id_context.c \
 	identity/id_screen.c
 
-endif
-
 ################################################################################
 
-if HAVE_NOOP_GALLIUM
-
 # Meta-driver which combines whichever software rasterizers have been
 # built into a single convenience library.
 
@@ -51,8 +41,6 @@ noop_libnoop_la_SOURCES = \
 	noop/noop_pipe.c \
 	noop/noop_state.c
 
-endif
-
 ################################################################################
 
 if NEED_RADEON_GALLIUM
@@ -63,4 +51,64 @@ endif
 
 ################################################################################
 
-SUBDIRS += $(GALLIUM_MAKE_DIRS)
+if HAVE_GALLIUM_I915
+
+SUBDIRS += i915
+
+endif
+
+################################################################################
+
+if HAVE_GALLIUM_NOUVEAU
+
+SUBDIRS += nouveau nv30 nv50 nvc0
+
+endif
+
+################################################################################
+
+if HAVE_GALLIUM_SVGA
+
+SUBDIRS += svga
+
+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/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am
index 68aa649..8ddb48c 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -39,16 +39,12 @@ PIPE_LIBS = \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
 	$(top_builddir)/src/gallium/drivers/trace/libtrace.la \
+	$(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
 	$(DLOPEN_LIBS) \
 	$(CLOCK_LIB) \
 	-lpthread \
 	-lm
 
-if HAVE_GALAHAD_GALLIUM
-PIPE_LIBS += $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la
-endif
-
-
 if HAVE_GALLIUM_I915
 pipe_LTLIBRARIES += pipe_i915.la
 pipe_i915_la_SOURCES = pipe_i915.c
-- 
1.7.8.6



More information about the mesa-dev mailing list