OSDN Git Service

57815ae9f1d40985ccfebf9c33e998315b8aa339
[android-x86/external-mesa.git] / src / mesa / Makefile.X11
1 # $Id: Makefile.X11,v 1.66 2002/04/02 16:20:00 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         config.c \
35         context.c \
36         convolve.c \
37         debug.c \
38         depth.c \
39         dispatch.c \
40         dlist.c \
41         drawpix.c \
42         enable.c \
43         enums.c \
44         eval.c \
45         extensions.c \
46         feedback.c \
47         fog.c \
48         get.c \
49         glapi.c \
50         glthread.c \
51         hash.c \
52         hint.c \
53         histogram.c \
54         image.c \
55         imports.c \
56         light.c \
57         lines.c \
58         matrix.c \
59         mem.c \
60         mmath.c \
61         pixel.c \
62         points.c \
63         polygon.c \
64         rastpos.c \
65         state.c \
66         stencil.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_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_pixeltex.c \
114         swrast/s_points.c \
115         swrast/s_readpix.c \
116         swrast/s_span.c \
117         swrast/s_stencil.c \
118         swrast/s_texture.c \
119         swrast/s_texstore.c \
120         swrast/s_triangle.c \
121         swrast/s_zoom.c \
122         swrast_setup/ss_context.c \
123         swrast_setup/ss_triangle.c \
124         swrast_setup/ss_vb.c \
125         tnl/t_array_api.c \
126         tnl/t_array_import.c \
127         tnl/t_context.c \
128         tnl/t_eval_api.c \
129         tnl/t_imm_alloc.c \
130         tnl/t_imm_api.c \
131         tnl/t_imm_debug.c \
132         tnl/t_imm_dlist.c \
133         tnl/t_imm_elt.c \
134         tnl/t_imm_eval.c \
135         tnl/t_imm_exec.c \
136         tnl/t_imm_fixup.c \
137         tnl/t_pipeline.c \
138         tnl/t_vb_fog.c \
139         tnl/t_vb_light.c \
140         tnl/t_vb_normals.c \
141         tnl/t_vb_points.c \
142         tnl/t_vb_program.c \
143         tnl/t_vb_render.c \
144         tnl/t_vb_texgen.c \
145         tnl/t_vb_texmat.c \
146         tnl/t_vb_vertex.c
147
148
149 DRIVER_SOURCES = \
150         FX/fxapi.c \
151         FX/fxdd.c \
152         FX/fxddspan.c \
153         FX/fxddtex.c \
154         FX/fxsetup.c \
155         FX/fxtexman.c \
156         FX/fxtris.c \
157         FX/fxvb.c \
158         FX/fxglidew.c \
159         X/glxapi.c \
160         X/fakeglx.c \
161         X/xfonts.c \
162         X/xm_api.c \
163         X/xm_dd.c \
164         X/xm_line.c \
165         X/xm_span.c \
166         X/xm_tri.c \
167         SVGA/svgamesa.c \
168         SVGA/svgamesa8.c \
169         SVGA/svgamesa15.c \
170         SVGA/svgamesa16.c \
171         SVGA/svgamesa24.c \
172         SVGA/svgamesa32.c
173
174
175 ASM_SOURCES =
176
177 ADDITIONAL_OBJ =
178
179 OBJECTS = $(ASM_SOURCES:.S=.o) \
180         $(CORE_SOURCES:.c=.o) \
181         $(DRIVER_SOURCES:.c=.o) \
182         $(ADDITIONAL_OBJ)
183
184
185 OSMESA_SOURCES = OSmesa/osmesa.c
186 OSMESA_OBJECTS = OSmesa/osmesa.o
187
188
189
190 ##### RULES #####
191
192 .c.o:
193         $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
194
195 .S.o:
196         $(CC) -c -I. $(CFLAGS) $< -o $@
197
198
199 X86/x86.o: X86/x86.c
200         $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
201 X86/common_x86.o: X86/common_x86.c
202         $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
203 X86/common_x86_asm.o: X86/common_x86_asm.S X86/matypes.h
204 X86/3dnow.o: X86/3dnow.c
205         $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
206 X86/sse.o: X86/sse.c
207         $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
208 X86/matypes.h: mtypes.h tnl/t_context.h X86/gen_matypes.c
209         $(CC) -I. -I$(INCDIR) $(CFLAGS) X86/gen_matypes.c -o X86/gen_matypes
210         ./X86/gen_matypes > X86/matypes.h
211         rm -f X86/gen_matypes X86/*.o
212
213 # We have X86/matypes.h depend on X86/matypes.h so that if ASM_SOURCES
214 # is empty we don't get an invalid Makefile.
215 $(ASM_SOURCES) X86/matypes.h: X86/matypes.h
216
217
218 ##### TARGETS #####
219
220 #default:
221 #       @echo "Specify a target configuration"
222
223 clean:
224         -rm -f *.o *~ */*.o */*~ *.lo *.la
225         -rm -rf .libs
226
227 targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(OSMESA_LIB)
228
229 # Make the GL library
230 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
231         $(MAKELIB) $(GL_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
232         rm -f $(LIBDIR)/$(GL_LIB)*
233         mv $(GL_LIB)* $(LIBDIR)
234
235
236 # Make the OSMesa library
237 $(LIBDIR)/$(OSMESA_LIB): $(OSMESA_OBJECTS)
238         if [ ${OSMESA_LIB} ] ; then $(MAKELIB) $(OSMESA_LIB) $(MESA_MAJOR) $(MESA_MINOR) $(GL_TINY) $(OSMESA_OBJECTS) ; fi
239         if [ ${OSMESA_LIB} ] ; then rm -f $(LIBDIR)/$(OSMESA_LIB)* ; fi
240         if [ ${OSMESA_LIB} ] ; then mv $(OSMESA_LIB)* $(LIBDIR) ; fi
241
242
243 include ../Make-config
244
245 include depend
246
247
248
249 #
250 # Run 'make dep' to update the dependencies if you change what's included
251 # by any source file.
252 #
253 dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
254         makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
255
256 tags:
257         etags `find . -name \*.[ch]` `find ../include`
258
259
260
261 # XXX temporary for NV_vertex_program
262 VPFILES = \
263         include/GL/glext.h \
264         src/Makefile.X11 \
265         src/vpparse.[ch] \
266         src/vpexec.[ch] \
267         src/vpstate.[ch] \
268         src/attrib.c \
269         src/context.c \
270         src/enable.c \
271         src/extensions.c \
272         src/get.c \
273         src/matrix.c \
274         src/mtypes.h \
275         src/varray.c \
276         src/tnl/t_vb_program.c \
277         tests/vptest1.c \
278         tests/vptest2.c
279
280 vptar:
281         cd .. ; tar cvf vpfiles.tar $(VPFILES) ; gzip vpfiles.tar
282