2 # Mesa 3-D graphics library
4 # Copyright (C) 1995-2003 Brian Paul
6 # Makefile for building Mesa for 16/32-bit/channel rendering with the OSMesa
16 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
18 GL_LIB_NAME = "GL" # may be overridden in Make-config
19 OSMESA_LIB_NAME = "OSMesa16" # may be overridden in Make-config
26 ### Lists of source files
95 math/m_debug_xform.c \
102 ARRAY_CACHE_SOURCES = \
103 array_cache/ac_context.c \
104 array_cache/ac_import.c
108 swrast/s_aatriangle.c \
111 swrast/s_alphabuf.c \
119 swrast/s_feedback.c \
125 swrast/s_nvfragprog.c \
126 swrast/s_pixeltex.c \
132 swrast/s_texstore.c \
133 swrast/s_triangle.c \
136 SWRAST_SETUP_SOURCES = \
137 swrast_setup/ss_context.c \
138 swrast_setup/ss_triangle.c \
143 tnl/t_array_import.c \
147 tnl/t_save_loopback.c \
148 tnl/t_save_playback.c \
171 x86/common_x86_asm.S \
191 sparc/glapi_sparc.S \
201 $(ARRAY_CACHE_SOURCES) \
204 $(SWRAST_SETUP_SOURCES) \
207 # This will probably get set to $(X86_SOURCES) in Make-config:
210 OSMESA_DRIVER_SOURCES = \
211 drivers/osmesa/osmesa.c
215 CORE_OBJECTS = $(CORE_SOURCES:.c=.o)
217 ASM_OBJECTS = $(ASM_SOURCES:.S=.o)
219 OSMESA_OBJECTS = $(OSMESA_DRIVER_SOURCES:.c=.o)
227 ### Include directories
232 -I$(TOP)/src/mesa/main \
233 -I$(TOP)/src/mesa/glapi \
234 -I$(TOP)/src/mesa/math \
235 -I$(TOP)/src/mesa/transform \
236 -I$(TOP)/src/mesa/swrast \
237 -I$(TOP)/src/mesa/swrast_setup
244 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
247 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
250 x86/matypes.h: main/mtypes.h tnl/t_context.h x86/gen_matypes.c
251 $(CC) $(INCLUDE_DIRS) $(CFLAGS) x86/gen_matypes.c -o x86/gen_matypes
252 ./x86/gen_matypes > x86/matypes.h
253 rm -f x86/gen_matypes x86/*.o
255 x86/common_x86_asm.o: x86/matypes.h
262 @echo "Specify a target configuration"
265 targets: $(LIBDIR)/$(OSMESA16_LIB)
267 # Make the 16-bit/channel OSMesa library
268 $(LIBDIR)/$(OSMESA16_LIB): $(OBJECTS)
269 $(TOP)/bin/mklib $(MAKELIB_FLAGS) -o $(OSMESA_LIB_NAME) -major $(GL_MAJOR) \
270 -minor $(GL_MINOR) -patch $(GL_TINY) -install $(LIBDIR) \
271 $(GL_LIB_DEPS) $(OBJECTS)
277 # Run 'make dep' to update the dependencies if you change what's included
278 # by any source file.
280 dep: $(CORE_SOURCES) $(OSMESA_DRIVER_SOURCES) $(ASM_SOURCES)
281 makedepend -fdepend -Y $(INCLUDE_DIRS) -DGGI -DSVGA -DFX \
282 $(CORE_SOURCES) $(OSMESA_DRIVER_SOURCES) \
286 makedepend -fdepend -Y -I../include $(CORE_SOURCES)
289 etags `find . -name \*.[ch]` `find ../include`
292 # Remove .o and backup files
295 -rm -f */*.o */*~ */*.o */*~
296 -rm -f drivers/*/*.o drivers/*/*/*.o
299 include $(TOP)/Make-config