If there is only one normal, don't transform it multiple times.
[mesa.git] / src / mesa / Makefile
index 2be76d8e08f7ee02398f5749121f77f1ea17a729..b88a122abffc29038a23e7d7914072b880554817 100644 (file)
@@ -26,6 +26,8 @@ default:
                $(MAKE) osmesa-only ; \
        elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
                $(MAKE) beos ; \
+       elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \
+               $(MAKE) directfb; \
        else \
                $(MAKE) stand-alone ; \
        fi
@@ -69,6 +71,30 @@ drivers-dri:
        cd drivers/dri ; $(MAKE)
 
 
+
+#####################################################################
+# Stand-alone Mesa libGL, no built-in drivers (DirectFB)
+
+LIBGL_CORE_SOURCES =   \
+       $(CORE_SOURCES)         \
+       $(ASM_SOURCES)
+
+LIBGL_CORE_OBJECTS =   \
+       $(CORE_OBJECTS)         \
+       $(ASM_SOURCES:.S=.o)
+
+# Make libGL from core object files
+libgl-core: $(LIBGL_CORE_OBJECTS)
+       @ CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) \
+               -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
+               -install $(LIB_DIR) $(MKLIB_OPTIONS) $(LIBGL_CORE_OBJECTS) $(GL_LIB_DEPS)
+
+# DirectFB driver target
+directfb: depend subdirs libgl-core
+       cd drivers/directfb; $(MAKE)
+
+
+
 ######################################################################
 # Stand-alone Mesa libGL and libOSMesa
 
@@ -112,19 +138,22 @@ subdirs:
 
 # Make the GL library
 $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
-       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) -major $(GL_MAJOR) \
-               -minor $(GL_MINOR) -patch $(GL_TINY) -install $(LIB_DIR) \
+       @ CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) \
+               -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
+               -install $(LIB_DIR) \
                $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
 
 # Make the OSMesa library
 $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
-       if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
-               CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \
+       @ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
+               CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) \
+                       -major $(MESA_MAJOR) \
                        -minor $(MESA_MINOR) -patch $(MESA_TINY) \
                        -install $(LIB_DIR) $(MKLIB_OPTIONS) \
                        $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
        else \
-               CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \
+               CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) \
+                       -major $(MESA_MAJOR) \
                        -minor $(MESA_MINOR) -patch $(GL_TINY) \
                        -install $(LIB_DIR) $(MKLIB_OPTIONS) \
                        $(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
@@ -167,9 +196,10 @@ SUBDIRS = array_cache drivers/dri glapi main math sparc swrast swrast_setup \
 
 # Update dependencies
 depend: $(ALL_SOURCES)
-       touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(ALL_SOURCES) \
-               > /dev/null 2>&1
+       @ echo "running $(MKDEP)"
+       @ touch depend
+       $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
+               > /dev/null 
 
 
 # Emacs tags