1 # $Id: Makefile.X11,v 1.73 2003/01/14 04:55:45 brianp Exp $
3 # Mesa 3-D graphics library
5 # Copyright (C) 1995-2002 Brian Paul
7 # Makefile for core library
14 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
84 math/m_debug_xform.c \
90 array_cache/ac_context.c \
91 array_cache/ac_import.c \
93 swrast/s_aatriangle.c \
104 swrast/s_feedback.c \
106 swrast/s_histogram.c \
111 swrast/s_nvfragprog.c \
112 swrast/s_pixeltex.c \
118 swrast/s_texstore.c \
119 swrast/s_triangle.c \
121 swrast_setup/ss_context.c \
122 swrast_setup/ss_triangle.c \
123 swrast_setup/ss_vb.c \
125 tnl/t_array_import.c \
178 OBJECTS = $(ASM_SOURCES:.S=.o) \
179 $(CORE_SOURCES:.c=.o) \
180 $(DRIVER_SOURCES:.c=.o) \
184 OSMESA_SOURCES = OSmesa/osmesa.c
185 OSMESA_OBJECTS = OSmesa/osmesa.o
192 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
195 $(CC) -c -I. $(CFLAGS) $< -o $@
199 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
200 X86/common_x86.o: X86/common_x86.c
201 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
202 X86/common_x86_asm.o: X86/common_x86_asm.S X86/matypes.h
203 X86/3dnow.o: X86/3dnow.c
204 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
206 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
207 X86/matypes.h: mtypes.h tnl/t_context.h X86/gen_matypes.c
208 $(CC) -I. -I$(INCDIR) $(CFLAGS) X86/gen_matypes.c -o X86/gen_matypes
209 ./X86/gen_matypes > X86/matypes.h
210 rm -f X86/gen_matypes X86/*.o
212 # We have X86/matypes.h depend on X86/matypes.h so that if ASM_SOURCES
213 # is empty we don't get an invalid Makefile.
214 $(ASM_SOURCES) X86/matypes.h: X86/matypes.h
220 # @echo "Specify a target configuration"
223 -rm -f *.o *~ */*.o */*~ *.lo *.la
226 targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(OSMESA_LIB)
228 # Make the GL library
229 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
230 $(MAKELIB) $(GL_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
231 rm -f $(LIBDIR)/$(GL_LIB)*
232 mv $(GL_LIB)* $(LIBDIR)
235 # Make the OSMesa library
236 $(LIBDIR)/$(OSMESA_LIB): $(OSMESA_OBJECTS)
237 if [ ${OSMESA_LIB} ] ; then $(MAKELIB) $(OSMESA_LIB) $(MESA_MAJOR) $(MESA_MINOR) $(GL_TINY) $(OSMESA_OBJECTS) ; fi
238 if [ ${OSMESA_LIB} ] ; then rm -f $(LIBDIR)/$(OSMESA_LIB)* ; fi
239 if [ ${OSMESA_LIB} ] ; then mv $(OSMESA_LIB)* $(LIBDIR) ; fi
242 include ../Make-config
249 # Run 'make dep' to update the dependencies if you change what's included
250 # by any source file.
252 dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
253 makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
256 etags `find . -name \*.[ch]` `find ../include`