Header file clean-up:
[mesa.git] / src / mesa / main / Makefile.X11
1 # $Id: Makefile.X11,v 1.71 2002/10/24 23:57:19 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 mmath.c \
59 pixel.c \
60 points.c \
61 polygon.c \
62 rastpos.c \
63 state.c \
64 stencil.c \
65 texcompress.c \
66 texformat.c \
67 teximage.c \
68 texobj.c \
69 texstate.c \
70 texstore.c \
71 texutil.c \
72 varray.c \
73 vpexec.c \
74 vpparse.c \
75 vpstate.c \
76 vtxfmt.c \
77 X86/x86.c \
78 X86/common_x86.c \
79 X86/3dnow.c \
80 X86/sse.c \
81 math/m_debug_clip.c \
82 math/m_debug_norm.c \
83 math/m_debug_xform.c \
84 math/m_eval.c \
85 math/m_matrix.c \
86 math/m_translate.c \
87 math/m_vector.c \
88 math/m_xform.c \
89 array_cache/ac_context.c \
90 array_cache/ac_import.c \
91 swrast/s_aaline.c \
92 swrast/s_aatriangle.c \
93 swrast/s_accum.c \
94 swrast/s_alpha.c \
95 swrast/s_alphabuf.c \
96 swrast/s_bitmap.c \
97 swrast/s_blend.c \
98 swrast/s_buffers.c \
99 swrast/s_copypix.c \
100 swrast/s_context.c \
101 swrast/s_depth.c \
102 swrast/s_drawpix.c \
103 swrast/s_feedback.c \
104 swrast/s_fog.c \
105 swrast/s_histogram.c \
106 swrast/s_imaging.c \
107 swrast/s_lines.c \
108 swrast/s_logic.c \
109 swrast/s_masking.c \
110 swrast/s_pixeltex.c \
111 swrast/s_points.c \
112 swrast/s_readpix.c \
113 swrast/s_span.c \
114 swrast/s_stencil.c \
115 swrast/s_texture.c \
116 swrast/s_texstore.c \
117 swrast/s_triangle.c \
118 swrast/s_zoom.c \
119 swrast_setup/ss_context.c \
120 swrast_setup/ss_triangle.c \
121 swrast_setup/ss_vb.c \
122 tnl/t_array_api.c \
123 tnl/t_array_import.c \
124 tnl/t_context.c \
125 tnl/t_eval_api.c \
126 tnl/t_imm_alloc.c \
127 tnl/t_imm_api.c \
128 tnl/t_imm_debug.c \
129 tnl/t_imm_dlist.c \
130 tnl/t_imm_elt.c \
131 tnl/t_imm_eval.c \
132 tnl/t_imm_exec.c \
133 tnl/t_imm_fixup.c \
134 tnl/t_pipeline.c \
135 tnl/t_vb_fog.c \
136 tnl/t_vb_light.c \
137 tnl/t_vb_normals.c \
138 tnl/t_vb_points.c \
139 tnl/t_vb_program.c \
140 tnl/t_vb_render.c \
141 tnl/t_vb_texgen.c \
142 tnl/t_vb_texmat.c \
143 tnl/t_vb_vertex.c
144
145
146 DRIVER_SOURCES = \
147 FX/fxapi.c \
148 FX/fxdd.c \
149 FX/fxddspan.c \
150 FX/fxddtex.c \
151 FX/fxsetup.c \
152 FX/fxtexman.c \
153 FX/fxtris.c \
154 FX/fxvb.c \
155 FX/fxglidew.c \
156 X/glxapi.c \
157 X/fakeglx.c \
158 X/xfonts.c \
159 X/xm_api.c \
160 X/xm_dd.c \
161 X/xm_line.c \
162 X/xm_span.c \
163 X/xm_tri.c \
164 SVGA/svgamesa.c \
165 SVGA/svgamesa8.c \
166 SVGA/svgamesa15.c \
167 SVGA/svgamesa16.c \
168 SVGA/svgamesa24.c \
169 SVGA/svgamesa32.c
170
171
172 ASM_SOURCES =
173
174 ADDITIONAL_OBJ =
175
176 OBJECTS = $(ASM_SOURCES:.S=.o) \
177 $(CORE_SOURCES:.c=.o) \
178 $(DRIVER_SOURCES:.c=.o) \
179 $(ADDITIONAL_OBJ)
180
181
182 OSMESA_SOURCES = OSmesa/osmesa.c
183 OSMESA_OBJECTS = OSmesa/osmesa.o
184
185
186
187 ##### RULES #####
188
189 .c.o:
190 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
191
192 .S.o:
193 $(CC) -c -I. $(CFLAGS) $< -o $@
194
195
196 X86/x86.o: X86/x86.c
197 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
198 X86/common_x86.o: X86/common_x86.c
199 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
200 X86/common_x86_asm.o: X86/common_x86_asm.S X86/matypes.h
201 X86/3dnow.o: X86/3dnow.c
202 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
203 X86/sse.o: X86/sse.c
204 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
205 X86/matypes.h: mtypes.h tnl/t_context.h X86/gen_matypes.c
206 $(CC) -I. -I$(INCDIR) $(CFLAGS) X86/gen_matypes.c -o X86/gen_matypes
207 ./X86/gen_matypes > X86/matypes.h
208 rm -f X86/gen_matypes X86/*.o
209
210 # We have X86/matypes.h depend on X86/matypes.h so that if ASM_SOURCES
211 # is empty we don't get an invalid Makefile.
212 $(ASM_SOURCES) X86/matypes.h: X86/matypes.h
213
214
215 ##### TARGETS #####
216
217 #default:
218 # @echo "Specify a target configuration"
219
220 clean:
221 -rm -f *.o *~ */*.o */*~ *.lo *.la
222 -rm -rf .libs
223
224 targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(OSMESA_LIB)
225
226 # Make the GL library
227 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
228 $(MAKELIB) $(GL_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
229 rm -f $(LIBDIR)/$(GL_LIB)*
230 mv $(GL_LIB)* $(LIBDIR)
231
232
233 # Make the OSMesa library
234 $(LIBDIR)/$(OSMESA_LIB): $(OSMESA_OBJECTS)
235 if [ ${OSMESA_LIB} ] ; then $(MAKELIB) $(OSMESA_LIB) $(MESA_MAJOR) $(MESA_MINOR) $(GL_TINY) $(OSMESA_OBJECTS) ; fi
236 if [ ${OSMESA_LIB} ] ; then rm -f $(LIBDIR)/$(OSMESA_LIB)* ; fi
237 if [ ${OSMESA_LIB} ] ; then mv $(OSMESA_LIB)* $(LIBDIR) ; fi
238
239
240 include ../Make-config
241
242 include depend
243
244
245
246 #
247 # Run 'make dep' to update the dependencies if you change what's included
248 # by any source file.
249 #
250 dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
251 makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
252
253 tags:
254 etags `find . -name \*.[ch]` `find ../include`