new texture compression infrastructure
[mesa.git] / src / mesa / Makefile.X11
1 # $Id: Makefile.X11,v 1.69 2002/09/27 02:45:37 brianp Exp $
2
3 # Mesa 3-D graphics library
4 # Version: 4.1
5 # Copyright (C) 1995-2002 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 api_arrayelt.c \
25 api_loopback.c \
26 api_noop.c \
27 api_validate.c \
28 accum.c \
29 attrib.c \
30 blend.c \
31 buffers.c \
32 clip.c \
33 colortab.c \
34 context.c \
35 convolve.c \
36 debug.c \
37 depth.c \
38 dispatch.c \
39 dlist.c \
40 drawpix.c \
41 enable.c \
42 enums.c \
43 eval.c \
44 extensions.c \
45 feedback.c \
46 fog.c \
47 get.c \
48 glapi.c \
49 glthread.c \
50 hash.c \
51 hint.c \
52 histogram.c \
53 image.c \
54 imports.c \
55 light.c \
56 lines.c \
57 matrix.c \
58 mem.c \
59 mmath.c \
60 pixel.c \
61 points.c \
62 polygon.c \
63 rastpos.c \
64 state.c \
65 stencil.c \
66 texcompress.c \
67 texformat.c \
68 teximage.c \
69 texobj.c \
70 texstate.c \
71 texstore.c \
72 texutil.c \
73 varray.c \
74 vpexec.c \
75 vpparse.c \
76 vpstate.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_xform.c \
85 math/m_eval.c \
86 math/m_matrix.c \
87 math/m_translate.c \
88 math/m_vector.c \
89 math/m_xform.c \
90 array_cache/ac_context.c \
91 array_cache/ac_import.c \
92 swrast/s_aaline.c \
93 swrast/s_aatriangle.c \
94 swrast/s_accum.c \
95 swrast/s_alpha.c \
96 swrast/s_alphabuf.c \
97 swrast/s_bitmap.c \
98 swrast/s_blend.c \
99 swrast/s_buffers.c \
100 swrast/s_copypix.c \
101 swrast/s_context.c \
102 swrast/s_depth.c \
103 swrast/s_drawpix.c \
104 swrast/s_feedback.c \
105 swrast/s_fog.c \
106 swrast/s_histogram.c \
107 swrast/s_imaging.c \
108 swrast/s_lines.c \
109 swrast/s_logic.c \
110 swrast/s_masking.c \
111 swrast/s_pixeltex.c \
112 swrast/s_points.c \
113 swrast/s_readpix.c \
114 swrast/s_span.c \
115 swrast/s_stencil.c \
116 swrast/s_texture.c \
117 swrast/s_texstore.c \
118 swrast/s_triangle.c \
119 swrast/s_zoom.c \
120 swrast_setup/ss_context.c \
121 swrast_setup/ss_triangle.c \
122 swrast_setup/ss_vb.c \
123 tnl/t_array_api.c \
124 tnl/t_array_import.c \
125 tnl/t_context.c \
126 tnl/t_eval_api.c \
127 tnl/t_imm_alloc.c \
128 tnl/t_imm_api.c \
129 tnl/t_imm_debug.c \
130 tnl/t_imm_dlist.c \
131 tnl/t_imm_elt.c \
132 tnl/t_imm_eval.c \
133 tnl/t_imm_exec.c \
134 tnl/t_imm_fixup.c \
135 tnl/t_pipeline.c \
136 tnl/t_vb_fog.c \
137 tnl/t_vb_light.c \
138 tnl/t_vb_normals.c \
139 tnl/t_vb_points.c \
140 tnl/t_vb_program.c \
141 tnl/t_vb_render.c \
142 tnl/t_vb_texgen.c \
143 tnl/t_vb_texmat.c \
144 tnl/t_vb_vertex.c
145
146
147 DRIVER_SOURCES = \
148 FX/fxapi.c \
149 FX/fxdd.c \
150 FX/fxddspan.c \
151 FX/fxddtex.c \
152 FX/fxsetup.c \
153 FX/fxtexman.c \
154 FX/fxtris.c \
155 FX/fxvb.c \
156 FX/fxglidew.c \
157 X/glxapi.c \
158 X/fakeglx.c \
159 X/xfonts.c \
160 X/xm_api.c \
161 X/xm_dd.c \
162 X/xm_line.c \
163 X/xm_span.c \
164 X/xm_tri.c \
165 SVGA/svgamesa.c \
166 SVGA/svgamesa8.c \
167 SVGA/svgamesa15.c \
168 SVGA/svgamesa16.c \
169 SVGA/svgamesa24.c \
170 SVGA/svgamesa32.c
171
172
173 ASM_SOURCES =
174
175 ADDITIONAL_OBJ =
176
177 OBJECTS = $(ASM_SOURCES:.S=.o) \
178 $(CORE_SOURCES:.c=.o) \
179 $(DRIVER_SOURCES:.c=.o) \
180 $(ADDITIONAL_OBJ)
181
182
183 OSMESA_SOURCES = OSmesa/osmesa.c
184 OSMESA_OBJECTS = OSmesa/osmesa.o
185
186
187
188 ##### RULES #####
189
190 .c.o:
191 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
192
193 .S.o:
194 $(CC) -c -I. $(CFLAGS) $< -o $@
195
196
197 X86/x86.o: X86/x86.c
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 $@
204 X86/sse.o: X86/sse.c
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
210
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
214
215
216 ##### TARGETS #####
217
218 #default:
219 # @echo "Specify a target configuration"
220
221 clean:
222 -rm -f *.o *~ */*.o */*~ *.lo *.la
223 -rm -rf .libs
224
225 targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(OSMESA_LIB)
226
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)
232
233
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
239
240
241 include ../Make-config
242
243 include depend
244
245
246
247 #
248 # Run 'make dep' to update the dependencies if you change what's included
249 # by any source file.
250 #
251 dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
252 makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
253
254 tags:
255 etags `find . -name \*.[ch]` `find ../include`
256
257
258
259 # XXX temporary for NV_vertex_program
260 VPFILES = \
261 include/GL/glext.h \
262 src/Makefile.X11 \
263 src/vpparse.[ch] \
264 src/vpexec.[ch] \
265 src/vpstate.[ch] \
266 src/attrib.c \
267 src/context.c \
268 src/enable.c \
269 src/extensions.c \
270 src/get.c \
271 src/matrix.c \
272 src/mtypes.h \
273 src/varray.c \
274 src/tnl/t_vb_program.c \
275 tests/vptest1.c \
276 tests/vptest2.c
277
278 vptar:
279 cd .. ; tar cvf vpfiles.tar $(VPFILES) ; gzip vpfiles.tar
280