Mesa (master): galahad: Use non-recursive automake
Tom Stellard
tstellar at kemper.freedesktop.org
Wed Mar 14 15:37:07 UTC 2012
Module: Mesa
Branch: master
Commit: 26ab747284e0d7ec5ef039c6ab3d50c3fab42ac4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=26ab747284e0d7ec5ef039c6ab3d50c3fab42ac4
Author: Tom Stellard <tstellar at gmail.com>
Date: Sat Mar 3 20:02:05 2012 -0500
galahad: Use non-recursive automake
---
configure.ac | 16 ++++++++++++++++
src/gallium/drivers/Makefile.am | 29 ++++++++++++++++++++++++++++-
src/gallium/drivers/galahad/Makefile | 14 --------------
3 files changed, 44 insertions(+), 15 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4515731..fd6c877 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1935,6 +1935,21 @@ if test "x$NEED_G3DVL_DRI" = xyes; then
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS g3dvl/dri"
fi
+dnl Tell Automake which drivers to build
+for driver in $GALLIUM_DRIVERS_DIRS; do
+ case "x$driver" in
+ xgalahad)
+ HAVE_GALAHAD_GALLIUM=yes;
+ ;;
+ *)
+ GALLIUM_MAKE_DIRS="$GALLIUM_MAKE_DIRS $driver"
+ ;;
+ esac
+done
+
+AM_CONDITIONAL(HAVE_GALAHAD_GALLIUM, test x$HAVE_GALAHAD_GALLIUM = xyes)
+AC_SUBST([GALLIUM_MAKE_DIRS])
+
dnl prepend CORE_DIRS to SRC_DIRS
SRC_DIRS="$CORE_DIRS $SRC_DIRS"
@@ -1986,6 +2001,7 @@ 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 b6954e2..6a0a247 100644
--- a/src/gallium/drivers/Makefile.am
+++ b/src/gallium/drivers/Makefile.am
@@ -1,4 +1,31 @@
-SUBDIRS = $(GALLIUM_DRIVERS_DIRS)
+AUTOMAKE_OPTIONS = subdir-objects
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/gallium/include \
+ -I$(top_srcdir)/src/gallium/auxiliary \
+ -I$(top_srcdir)/src/gallium/drivers \
+ $(DEFINES) \
+ $(ASM_FLAGS) \
+ $(PIC_FLAGS)
+
+noinst_LIBRARIES =
+
+################################################################################
+
+if HAVE_GALAHAD_GALLIUM
+
+noinst_LIBRARIES+= galahad/libgalahad.a
+
+galahad_libgalahad_a_SOURCES = \
+ galahad/glhd_objects.c \
+ galahad/glhd_context.c \
+ galahad/glhd_screen.c
+
+endif
+
+################################################################################
+
+SUBDIRS = $(GALLIUM_MAKE_DIRS)
# FIXME: Remove when the rest of Gallium is converted to automake.
default: all
diff --git a/src/gallium/drivers/galahad/Makefile b/src/gallium/drivers/galahad/Makefile
deleted file mode 100644
index 15ea136..0000000
--- a/src/gallium/drivers/galahad/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-TOP = ../../../..
-include $(TOP)/configs/current
-
-LIBNAME = galahad
-
-C_SOURCES = \
- glhd_objects.c \
- glhd_context.c \
- glhd_screen.c
-
-include ../../Makefile.template
-
-# FIXME: Remove when this driver is converted to automake.
-all: default
More information about the mesa-commit
mailing list