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 $@
$(MAKE) osmesa-only ; \
elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
$(MAKE) beos ; \
+ elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \
+ $(MAKE) directfb; \
else \
$(MAKE) stand-alone ; \
fi
cd drivers/beos; $(MAKE)
+install: default
+ @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
+ cd drivers/dri ; $(MAKE) install ; \
+ fi
+
######################################################################
# Linux solo DRI drivers
$(SWRAST_SOURCES) \
$(SWRAST_SETUP_SOURCES) \
$(SHADER_SOURCES) \
+ $(SLANG_SOURCES) \
$(ASM_C_SOURCES)
SOLO_OBJECTS = $(SOLO_C_SOURCES:.c=.o) \
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
subdirs:
@ (cd x86 ; $(MAKE))
+ @ (cd x86-64 ; $(MAKE))
# Make the GL library
$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
- @ CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) \
+ @ 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) \
+ 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) \
+ CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(OSMESA_LIB) \
-major $(MESA_MAJOR) \
-minor $(MESA_MINOR) -patch $(GL_TINY) \
-install $(LIB_DIR) $(MKLIB_OPTIONS) \
clean:
-rm -f */*.o
+ -rm -f */*/*.o
-rm -f depend depend.bak mesa.a
-rm -f drivers/*/*.o
(cd drivers/dri ; $(MAKE) clean)
+ (cd x86 ; $(MAKE) clean)
+ (cd x86-64 ; $(MAKE) clean)
include depend