Massively cleaned up the code that calculates front/back/depth buffer
[mesa.git] / src / mesa / Makefile
index ea844afae7ab82f7b583f41bfea0509091e6b7f3..87279eed1823abbb6365a538724465a1bb90e42a 100644 (file)
@@ -24,10 +24,16 @@ default:
                $(MAKE) linux-solo ; \
        elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
                $(MAKE) osmesa-only ; \
+       elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
+               $(MAKE) beos ; \
        else \
                $(MAKE) stand-alone ; \
        fi
 
+# BeOS driver target
+beos: depend subdirs mesa.a
+       cd drivers/beos; $(MAKE)
+
 
 ######################################################################
 # Linux solo DRI drivers
@@ -45,19 +51,21 @@ SOLO_C_SOURCES = \
 SOLO_OBJECTS = $(SOLO_C_SOURCES:.c=.o) \
                $(ASM_SOURCES:.S=.o)
 
-
-linux-solo: depend subdirs mesa.a driver-dirs
+linux-solo: depend subdirs mesa.a drivers-dri
 
 # Make archive of core object files
 mesa.a:        $(SOLO_OBJECTS)
        rm -f $@
        ar rcv $@ $(SOLO_OBJECTS)
        ranlib $@
+       @if [ "${CONFIG_NAME}" = "beos" ] ; then \
+               mimeset -f "$@" ; \
+       fi
 
 # note: cannot use the name of the directory ("drivers") as the
 # target, otherwise make will look & see that the "drivers" directory
 # already exists, so not try to rebuild it...
-driver-dirs:
+drivers-dri:
        cd drivers/dri ; $(MAKE)
 
 
@@ -95,7 +103,6 @@ OSMESA16_OBJECTS = \
        $(OSMESA_DRIVER_OBJECTS)
 
 
-
 stand-alone: depend subdirs $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(OSMESA_LIB_NAME)
 
 osmesa-only: depend subdirs $(LIB_DIR)/$(OSMESA_LIB_NAME)
@@ -105,19 +112,19 @@ subdirs:
 
 # Make the GL library
 $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
-       $(TOP)/bin/mklib -o $(GL_LIB) -major $(GL_MAJOR) \
+       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 \
-               $(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 $(MESA_TINY) \
                        -install $(LIB_DIR) $(MKLIB_OPTIONS) \
                        $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
        else \
-               $(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) ; \
@@ -169,9 +176,8 @@ tags:
 
 clean:
        -rm -f */*.o
-       rm -f depend mesa.a
-       for dir in $(SUBDIRS) ; do \
-               (cd $$dir ; $(MAKE) clean) ; \
-       done
+       -rm -f depend depend.bak mesa.a
+       -rm -f drivers/*/*.o
+       (cd drivers/dri ; $(MAKE) clean)
 
 include depend