summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2007-12-30 08:41:53 -0800
committerDan Nicholson <dbn.lists@gmail.com>2008-01-11 08:25:15 -0800
commit544ab209e75ec3646d7edbafd736dcf4c93738cc (patch)
treec8642fb334f36e5bd9b552b09e3236bba1b835a3 /src
parent540faf5f91057ef311999afc5a6366bebe7dec33 (diff)
Allow osmesa to be enabled or disabled
The conditional in src/mesa/Makefile currently hardcodes the cases where libOSMesa can be built on libGL. Likewise, the xlib case always includes libOSMesa in the stand-alone target. This changes the conditional to a loop over the DRIVER_DIRS variable. This means that any driver configuration can enable or disable osmesa. The current "stand-alone" rule is changed so that DRIVER_DIRS=x11 and DRIVER_DIRS="x11 osmesa" are both respected. The configure option is changed to --enable-gl-osmesa as this change allows libOSMesa to be built upon any of the libGL-enabling drivers.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/Makefile34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 2c6d65d8a1..02e0054479 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -25,19 +25,17 @@ GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
# Figure out what to make here
default:
- @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
- $(MAKE) linux-solo ; \
- elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
- $(MAKE) osmesa-only ; \
- elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
- $(MAKE) beos ; \
- elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \
- $(MAKE) directfb ; \
- elif [ "$(DRIVER_DIRS)" = "fbdev osmesa" ]; then \
- $(MAKE) fbdev ; $(MAKE) osmesa-only ; \
- else \
- $(MAKE) stand-alone ; \
- fi
+ @for driver in $(DRIVER_DIRS) ; do \
+ case "$$driver" in \
+ x11) $(MAKE) stand-alone ;; \
+ dri) $(MAKE) linux-solo ;; \
+ osmesa) $(MAKE) osmesa-only ;; \
+ beos) $(MAKE) beos ;; \
+ directfb) $(MAKE) directfb ;; \
+ fbdev) $(MAKE) fbdev ;; \
+ *) echo "$$driver is invalid in DRIVER_DIRS" >&2; exit 1;; \
+ esac ; \
+ done
######################################################################
@@ -105,7 +103,7 @@ OSMESA16_OBJECTS = \
$(OSMESA_DRIVER_OBJECTS)
-stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
+stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
@@ -174,9 +172,11 @@ install: default gl.pc
@if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
$(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
fi
- @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
- cd drivers/dri ; $(MAKE) install ; \
- fi
+ @for target in $(DRIVER_DIRS); do \
+ case "$$target" in \
+ dri) cd drivers/dri ; $(MAKE) install ;; \
+ esac; \
+ done
## NOT INSTALLED YET:
## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES