1 # $Id: Makefile.X11,v 1.74 2003/03/01 01:50:20 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)
83 math/m_debug_xform.c \
89 array_cache/ac_context.c \
90 array_cache/ac_import.c \
92 swrast/s_aatriangle.c \
103 swrast/s_feedback.c \
105 swrast/s_histogram.c \
110 swrast/s_nvfragprog.c \
111 swrast/s_pixeltex.c \
117 swrast/s_texstore.c \
118 swrast/s_triangle.c \
120 swrast_setup/ss_context.c \
121 swrast_setup/ss_triangle.c \
122 swrast_setup/ss_vb.c \
124 tnl/t_array_import.c \
177 OBJECTS = $(ASM_SOURCES:.S=.o) \
178 $(CORE_SOURCES:.c=.o) \
179 $(DRIVER_SOURCES:.c=.o) \
183 OSMESA_SOURCES = OSmesa/osmesa.c
184 OSMESA_OBJECTS = OSmesa/osmesa.o
191 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
194 $(CC) -c -I. $(CFLAGS) $< -o $@
198 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
199 X86/common_x86.o: X86/common_x86.c
200 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
201 X86/common_x86_asm.o: X86/common_x86_asm.S X86/matypes.h
202 X86/3dnow.o: X86/3dnow.c
203 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
205 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
206 X86/matypes.h: mtypes.h tnl/t_context.h X86/gen_matypes.c
207 $(CC) -I. -I$(INCDIR) $(CFLAGS) X86/gen_matypes.c -o X86/gen_matypes
208 ./X86/gen_matypes > X86/matypes.h
209 rm -f X86/gen_matypes X86/*.o
211 # We have X86/matypes.h depend on X86/matypes.h so that if ASM_SOURCES
212 # is empty we don't get an invalid Makefile.
213 $(ASM_SOURCES) X86/matypes.h: X86/matypes.h
219 # @echo "Specify a target configuration"
222 -rm -f *.o *~ */*.o */*~ *.lo *.la
225 targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(OSMESA_LIB)
227 # Make the GL library
228 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
229 $(MAKELIB) $(GL_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
230 rm -f $(LIBDIR)/$(GL_LIB)*
231 mv $(GL_LIB)* $(LIBDIR)
234 # Make the OSMesa library
235 $(LIBDIR)/$(OSMESA_LIB): $(OSMESA_OBJECTS)
236 if [ ${OSMESA_LIB} ] ; then $(MAKELIB) $(OSMESA_LIB) $(MESA_MAJOR) $(MESA_MINOR) $(GL_TINY) $(OSMESA_OBJECTS) ; fi
237 if [ ${OSMESA_LIB} ] ; then rm -f $(LIBDIR)/$(OSMESA_LIB)* ; fi
238 if [ ${OSMESA_LIB} ] ; then mv $(OSMESA_LIB)* $(LIBDIR) ; fi
241 include ../Make-config
248 # Run 'make dep' to update the dependencies if you change what's included
249 # by any source file.
251 dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
252 makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
255 etags `find . -name \*.[ch]` `find ../include`