added missing prototype
[mesa.git] / src / mesa / Makefile
index d77af533e1c00c3364ce6f0df5c21d67ca5add50..b7cfc73f9a7fa7ad65eff90e082aa7006f16dd77 100644 (file)
@@ -11,9 +11,14 @@ GL_MINOR = 5
 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
 
 
+.SUFFIXES : .cpp
+
 .c.o:
        $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
 
+.cpp.o:
+       $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
+
 .S.o:
        $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
 
@@ -26,6 +31,8 @@ default:
                $(MAKE) osmesa-only ; \
        elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
                $(MAKE) beos ; \
+       elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \
+               $(MAKE) directfb; \
        else \
                $(MAKE) stand-alone ; \
        fi
@@ -35,6 +42,11 @@ beos: depend subdirs mesa.a
        cd drivers/beos; $(MAKE)
 
 
+install: default
+       @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
+               cd drivers/dri ; $(MAKE) install ; \
+       fi
+
 ######################################################################
 # Linux solo DRI drivers
 
@@ -69,6 +81,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
 
@@ -172,8 +208,8 @@ SUBDIRS = array_cache drivers/dri glapi main math sparc swrast swrast_setup \
 depend: $(ALL_SOURCES)
        @ echo "running $(MKDEP)"
        @ touch depend
-       @ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(ALL_SOURCES) \
-               > /dev/null 2>&1
+       $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
+               > /dev/null 
 
 
 # Emacs tags
@@ -185,5 +221,6 @@ clean:
        -rm -f depend depend.bak mesa.a
        -rm -f drivers/*/*.o
        (cd drivers/dri ; $(MAKE) clean)
+       (cd x86 ; $(MAKE) clean)
 
 include depend