TOP = ../..
include $(TOP)/configs/current
-include sources
-
+include sources.mak
.SUFFIXES : .cpp
default: depend asm_subdirs libmesa.a libglapi.a driver_subdirs
+# Default: build dependencies, then asm_subdirs, then convenience
+# libs (.a) and finally the device drivers:
+default: depend asm_subdirs libmesa.a $(GLAPI_LIB) driver_subdirs
######################################################################
# Helper libraries used by many drivers:
libglapi.a: $(GLAPI_OBJECTS)
@ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS)
+# Make archive of gl* API dispatcher functions only
+$(GLAPI_LIB): $(GLAPI_OBJECTS)
+ @if [ "${WINDOW_SYSTEM}" = "dri" ] ; then \
+ touch libglapi.a ; \
+ else \
+ $(TOP)/bin/mklib -o glapi -static $(GLAPI_OBJECTS) ; \
+ fi
######################################################################
# Device drivers