# Makefile for building the OSMesa library with deep color channel support. # This is a bit different from the normal libOSMesa.so library in that # the libs made here will contain a full Mesa implementation (i.e. the # OSMesa lib won't piggyback on libGL.so) ##### MACROS ##### TOP = ../.. GL_MAJOR = 1 GL_MINOR = 5 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) OSMESA_LIB_NAME = "OSMesa16" # may be overridden in Make-config LIBDIR = $(TOP)/lib include sources # This will probably get set to $(X86_SOURCES) in Make-config: ASM_SOURCES = # All the sources we care about: SOURCES = \ $(CORE_SOURCES) \ $(ASM_SOURCES) \ $(OSMESA_DRIVER_SOURCES) ASM_OBJECTS = $(ASM_SOURCES:.S=.o) OSMESA_OBJECTS = $(OSMESA_DRIVER_SOURCES:.c=.o) # All the objects we want to make: OBJECTS = \ $(CORE_OBJECTS) \ $(ASM_OBJECTS) \ $(OSMESA_OBJECTS) ##### RULES ##### .c.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ .S.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ ##### TARGETS ##### default: @echo "Specify a target configuration" targets: $(LIBDIR)/$(OSMESA_LIB) # Make the 16-bit/channel or 32-bit/channel OSMesa library $(LIBDIR)/$(OSMESA_LIB): $(OBJECTS) $(TOP)/bin/mklib $(MAKELIB_FLAGS) -o $(OSMESA_LIB_NAME) \ -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ $(MKLIB_OPTIONS) -install $(LIBDIR) $(GL_LIB_DEPS) $(OBJECTS) # Run 'make dep' to update the dependencies if you change what's included # by any source file. dep: $(SOURCES) makedepend -fdepend -Y $(INCLUDE_DIRS) $(SOURCES) include $(TOP)/Make-config include depend