Remove rules that were put into place to deal with compiling files that
[mesa.git] / src / mesa / Makefile.X11
1 # $Id: Makefile.X11,v 1.61 2001/12/14 16:35:55 kschultz Exp $
2
3 # Mesa 3-D graphics library
4 # Version: 4.1
5 # Copyright (C) 1995-2001 Brian Paul
6
7 # Makefile for core library
8
9
10 ##### MACROS #####
11
12 GL_MAJOR = 1
13 GL_MINOR = 3
14 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
15
16 VPATH = RCS
17
18 INCDIR = ../include
19 LIBDIR = ../lib
20
21
22
23 CORE_SOURCES = \
24 vpexec.c \
25 vpparse.c \
26 vpstate.c \
27 api_arrayelt.c \
28 api_loopback.c \
29 api_noop.c \
30 api_validate.c \
31 accum.c \
32 attrib.c \
33 blend.c \
34 buffers.c \
35 clip.c \
36 colortab.c \
37 config.c \
38 context.c \
39 convolve.c \
40 debug.c \
41 depth.c \
42 dispatch.c \
43 dlist.c \
44 drawpix.c \
45 enable.c \
46 enums.c \
47 eval.c \
48 extensions.c \
49 feedback.c \
50 fog.c \
51 get.c \
52 glapi.c \
53 glthread.c \
54 hash.c \
55 hint.c \
56 histogram.c \
57 image.c \
58 imports.c \
59 light.c \
60 lines.c \
61 matrix.c \
62 mem.c \
63 mmath.c \
64 pixel.c \
65 points.c \
66 polygon.c \
67 rastpos.c \
68 state.c \
69 stencil.c \
70 texformat.c \
71 teximage.c \
72 texobj.c \
73 texstate.c \
74 texstore.c \
75 texutil.c \
76 varray.c \
77 vtxfmt.c \
78 X86/x86.c \
79 X86/common_x86.c \
80 X86/3dnow.c \
81 X86/sse.c \
82 math/m_debug_clip.c \
83 math/m_debug_norm.c \
84 math/m_debug_vertex.c \
85 math/m_debug_xform.c \
86 math/m_eval.c \
87 math/m_matrix.c \
88 math/m_translate.c \
89 math/m_vector.c \
90 math/m_vertices.c \
91 math/m_xform.c \
92 array_cache/ac_context.c \
93 array_cache/ac_import.c \
94 swrast/s_aaline.c \
95 swrast/s_aatriangle.c \
96 swrast/s_accum.c \
97 swrast/s_alpha.c \
98 swrast/s_alphabuf.c \
99 swrast/s_bitmap.c \
100 swrast/s_blend.c \
101 swrast/s_buffers.c \
102 swrast/s_copypix.c \
103 swrast/s_context.c \
104 swrast/s_depth.c \
105 swrast/s_drawpix.c \
106 swrast/s_feedback.c \
107 swrast/s_fog.c \
108 swrast/s_histogram.c \
109 swrast/s_imaging.c \
110 swrast/s_lines.c \
111 swrast/s_logic.c \
112 swrast/s_masking.c \
113 swrast/s_pb.c \
114 swrast/s_pixeltex.c \
115 swrast/s_points.c \
116 swrast/s_readpix.c \
117 swrast/s_scissor.c \
118 swrast/s_span.c \
119 swrast/s_stencil.c \
120 swrast/s_texture.c \
121 swrast/s_texstore.c \
122 swrast/s_triangle.c \
123 swrast/s_zoom.c \
124 swrast_setup/ss_context.c \
125 swrast_setup/ss_triangle.c \
126 swrast_setup/ss_vb.c \
127 tnl/t_array_api.c \
128 tnl/t_array_import.c \
129 tnl/t_context.c \
130 tnl/t_eval_api.c \
131 tnl/t_imm_alloc.c \
132 tnl/t_imm_api.c \
133 tnl/t_imm_debug.c \
134 tnl/t_imm_dlist.c \
135 tnl/t_imm_elt.c \
136 tnl/t_imm_eval.c \
137 tnl/t_imm_exec.c \
138 tnl/t_imm_fixup.c \
139 tnl/t_pipeline.c \
140 tnl/t_vb_fog.c \
141 tnl/t_vb_light.c \
142 tnl/t_vb_normals.c \
143 tnl/t_vb_points.c \
144 tnl/t_vb_program.c \
145 tnl/t_vb_render.c \
146 tnl/t_vb_texgen.c \
147 tnl/t_vb_texmat.c \
148 tnl/t_vb_vertex.c
149
150
151 DRIVER_SOURCES = \
152 FX/fxapi.c \
153 FX/fxdd.c \
154 FX/fxddspan.c \
155 FX/fxddtex.c \
156 FX/fxsetup.c \
157 FX/fxtexman.c \
158 FX/fxtris.c \
159 FX/fxvb.c \
160 FX/fxglidew.c \
161 X/glxapi.c \
162 X/fakeglx.c \
163 X/xfonts.c \
164 X/xm_api.c \
165 X/xm_dd.c \
166 X/xm_line.c \
167 X/xm_span.c \
168 X/xm_tri.c \
169 SVGA/svgamesa.c \
170 SVGA/svgamesa8.c \
171 SVGA/svgamesa15.c \
172 SVGA/svgamesa16.c \
173 SVGA/svgamesa24.c \
174 SVGA/svgamesa32.c
175
176
177 ASM_SOURCES =
178
179 ADDITIONAL_OBJ =
180
181 OBJECTS = $(ASM_SOURCES:.S=.o) \
182 $(CORE_SOURCES:.c=.o) \
183 $(DRIVER_SOURCES:.c=.o) \
184 $(ADDITIONAL_OBJ)
185
186
187 OSMESA_SOURCES = OSmesa/osmesa.c
188 OSMESA_OBJECTS = OSmesa/osmesa.o
189
190
191
192 ##### RULES #####
193
194 .c.o:
195 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
196
197 .S.o:
198 $(CC) -c -I. $(CFLAGS) $< -o $@
199
200
201 X86/x86.o: X86/x86.c
202 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
203 X86/common_x86.o: X86/common_x86.c
204 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
205 X86/common_x86_asm.o: X86/common_x86_asm.S X86/matypes.h
206 X86/3dnow.o: X86/3dnow.c
207 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
208 X86/sse.o: X86/sse.c
209 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
210 X86/matypes.h: mtypes.h tnl/t_context.h X86/gen_matypes.c
211 $(CC) -I. -I$(INCDIR) $(CFLAGS) X86/gen_matypes.c -o X86/gen_matypes
212 ./X86/gen_matypes > X86/matypes.h
213 rm -f X86/gen_matypes X86/*.o
214
215 # We have X86/matypes.h depend on X86/matypes.h so that if ASM_SOURCES
216 # is empty we don't get an invalid Makefile.
217 $(ASM_SOURCES) X86/matypes.h: X86/matypes.h
218
219
220 ##### TARGETS #####
221
222 #default:
223 # @echo "Specify a target configuration"
224
225 clean:
226 -rm -f *.o *~ */*.o */*~ *.lo *.la
227 -rm -rf .libs
228
229 targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(OSMESA_LIB)
230
231 # Make the GL library
232 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
233 $(MAKELIB) $(GL_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
234 rm -f $(LIBDIR)/$(GL_LIB)*
235 mv $(GL_LIB)* $(LIBDIR)
236
237
238 # Make the OSMesa library
239 $(LIBDIR)/$(OSMESA_LIB): $(OSMESA_OBJECTS)
240 if [ ${OSMESA_LIB} ] ; then $(MAKELIB) $(OSMESA_LIB) $(MESA_MAJOR) $(MESA_MINOR) $(GL_TINY) $(OSMESA_OBJECTS) ; fi
241 if [ ${OSMESA_LIB} ] ; then rm -f $(LIBDIR)/$(OSMESA_LIB)* ; fi
242 if [ ${OSMESA_LIB} ] ; then mv $(OSMESA_LIB)* $(LIBDIR) ; fi
243
244
245 include ../Make-config
246
247 include depend
248
249
250
251 #
252 # Run 'make dep' to update the dependencies if you change what's included
253 # by any source file.
254 #
255 dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
256 makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
257
258 tags:
259 etags `find . -name \*.[ch]` `find ../include`
260
261
262
263 # XXX temporary for NV_vertex_program
264 VPFILES = \
265 include/GL/glext.h \
266 src/Makefile.X11 \
267 src/vpparse.[ch] \
268 src/vpexec.[ch] \
269 src/vpstate.[ch] \
270 src/attrib.c \
271 src/context.c \
272 src/enable.c \
273 src/extensions.c \
274 src/get.c \
275 src/matrix.c \
276 src/mtypes.h \
277 src/varray.c \
278 src/tnl/t_vb_program.c \
279 tests/vptest1.c \
280 tests/vptest2.c
281
282 vptar:
283 cd .. ; tar cvf vpfiles.tar $(VPFILES) ; gzip vpfiles.tar
284