Fix VERT_SET_RGBA, VERT_SET_SPEC macros to account for change to floating
[mesa.git] / src / mesa / Makefile.OSMesa16
1
2 # Mesa 3-D graphics library
3 # Version: 5.1
4 # Copyright (C) 1995-2003 Brian Paul
5
6 # Makefile for building Mesa for 16/32-bit/channel rendering with the OSMesa
7 # driver.
8
9
10 ##### MACROS #####
11
12 TOP = ../..
13
14 GL_MAJOR = 1
15 GL_MINOR = 4
16 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
17
18 GL_LIB_NAME = "GL" # may be overridden in Make-config
19 OSMESA_LIB_NAME = "OSMesa16" # may be overridden in Make-config
20
21 VPATH = RCS
22
23 LIBDIR = $(TOP)/lib
24
25
26 ### Lists of source files
27
28 MAIN_SOURCES = \
29 main/api_arrayelt.c \
30 main/api_loopback.c \
31 main/api_noop.c \
32 main/api_validate.c \
33 main/accum.c \
34 main/arbparse.c \
35 main/arbprogram.c \
36 main/arbfragparse.c \
37 main/arbvertparse.c \
38 main/attrib.c \
39 main/blend.c \
40 main/bufferobj.c \
41 main/buffers.c \
42 main/clip.c \
43 main/colortab.c \
44 main/context.c \
45 main/convolve.c \
46 main/debug.c \
47 main/depth.c \
48 main/dispatch.c \
49 main/dlist.c \
50 main/drawpix.c \
51 main/enable.c \
52 main/enums.c \
53 main/eval.c \
54 main/extensions.c \
55 main/feedback.c \
56 main/fog.c \
57 main/get.c \
58 main/hash.c \
59 main/hint.c \
60 main/histogram.c \
61 main/image.c \
62 main/imports.c \
63 main/light.c \
64 main/lines.c \
65 main/matrix.c \
66 main/nvprogram.c \
67 main/nvfragparse.c \
68 main/nvvertexec.c \
69 main/nvvertparse.c \
70 main/occlude.c \
71 main/pixel.c \
72 main/points.c \
73 main/polygon.c \
74 main/program.c \
75 main/rastpos.c \
76 main/state.c \
77 main/stencil.c \
78 main/texcompress.c \
79 main/texformat.c \
80 main/teximage.c \
81 main/texobj.c \
82 main/texstate.c \
83 main/texstore.c \
84 main/texutil.c \
85 main/varray.c \
86 main/vtxfmt.c
87
88 GLAPI_SOURCES = \
89 glapi/glapi.c \
90 glapi/glthread.c
91
92 MATH_SOURCES = \
93 math/m_debug_clip.c \
94 math/m_debug_norm.c \
95 math/m_debug_xform.c \
96 math/m_eval.c \
97 math/m_matrix.c \
98 math/m_translate.c \
99 math/m_vector.c \
100 math/m_xform.c
101
102 ARRAY_CACHE_SOURCES = \
103 array_cache/ac_context.c \
104 array_cache/ac_import.c
105
106 SWRAST_SOURCES = \
107 swrast/s_aaline.c \
108 swrast/s_aatriangle.c \
109 swrast/s_accum.c \
110 swrast/s_alpha.c \
111 swrast/s_alphabuf.c \
112 swrast/s_bitmap.c \
113 swrast/s_blend.c \
114 swrast/s_buffers.c \
115 swrast/s_copypix.c \
116 swrast/s_context.c \
117 swrast/s_depth.c \
118 swrast/s_drawpix.c \
119 swrast/s_feedback.c \
120 swrast/s_fog.c \
121 swrast/s_imaging.c \
122 swrast/s_lines.c \
123 swrast/s_logic.c \
124 swrast/s_masking.c \
125 swrast/s_nvfragprog.c \
126 swrast/s_pixeltex.c \
127 swrast/s_points.c \
128 swrast/s_readpix.c \
129 swrast/s_span.c \
130 swrast/s_stencil.c \
131 swrast/s_texture.c \
132 swrast/s_texstore.c \
133 swrast/s_triangle.c \
134 swrast/s_zoom.c
135
136 SWRAST_SETUP_SOURCES = \
137 swrast_setup/ss_context.c \
138 swrast_setup/ss_triangle.c \
139 swrast_setup/ss_vb.c
140
141 TNL_SOURCES = \
142 tnl/t_array_api.c \
143 tnl/t_array_import.c \
144 tnl/t_context.c \
145 tnl/t_pipeline.c \
146 tnl/t_save_api.c \
147 tnl/t_save_loopback.c \
148 tnl/t_save_playback.c \
149 tnl/t_vb_fog.c \
150 tnl/t_vb_light.c \
151 tnl/t_vb_normals.c \
152 tnl/t_vb_points.c \
153 tnl/t_vb_program.c \
154 tnl/t_vb_render.c \
155 tnl/t_vb_texgen.c \
156 tnl/t_vb_texmat.c \
157 tnl/t_vb_vertex.c \
158 tnl/t_vtx_api.c \
159 tnl/t_vtx_eval.c \
160 tnl/t_vtx_exec.c
161
162
163 ASM_C_SOURCES = \
164 x86/common_x86.c \
165 x86/x86.c \
166 x86/3dnow.c \
167 x86/sse.c \
168 sparc/sparc.c
169
170 X86_SOURCES = \
171 x86/common_x86_asm.S \
172 x86/glapi_x86.S \
173 x86/x86_xform2.S \
174 x86/x86_xform3.S \
175 x86/x86_xform4.S \
176 x86/x86_cliptest.S \
177 x86/mmx_blend.S \
178 x86/3dnow_xform1.S \
179 x86/3dnow_xform2.S \
180 x86/3dnow_xform3.S \
181 x86/3dnow_xform4.S \
182 x86/3dnow_normal.S \
183 x86/sse_xform1.S \
184 x86/sse_xform2.S \
185 x86/sse_xform3.S \
186 x86/sse_xform4.S \
187 x86/sse_normal.S
188
189 SPARC_SOURCES = \
190 sparc/clip.S \
191 sparc/glapi_sparc.S \
192 sparc/norm.S \
193 sparc/xform.S
194
195 ### Groups of files
196
197 CORE_SOURCES = \
198 $(MAIN_SOURCES) \
199 $(GLAPI_SOURCES) \
200 $(MATH_SOURCES) \
201 $(ARRAY_CACHE_SOURCES) \
202 $(TNL_SOURCES) \
203 $(SWRAST_SOURCES) \
204 $(SWRAST_SETUP_SOURCES) \
205 $(ASM_C_SOURCES)
206
207 # This will probably get set to $(X86_SOURCES) in Make-config:
208 ASM_SOURCES =
209
210 OSMESA_DRIVER_SOURCES = \
211 drivers/osmesa/osmesa.c
212
213 ### Object files
214
215 CORE_OBJECTS = $(CORE_SOURCES:.c=.o)
216
217 ASM_OBJECTS = $(ASM_SOURCES:.S=.o)
218
219 OSMESA_OBJECTS = $(OSMESA_DRIVER_SOURCES:.c=.o)
220
221 OBJECTS = \
222 $(CORE_OBJECTS) \
223 $(ASM_OBJECTS) \
224 $(OSMESA_OBJECTS)
225
226
227 ### Include directories
228
229 INCLUDE_DIRS = \
230 -I$(TOP)/include \
231 -I$(TOP)/src/mesa \
232 -I$(TOP)/src/mesa/main \
233 -I$(TOP)/src/mesa/glapi \
234 -I$(TOP)/src/mesa/math \
235 -I$(TOP)/src/mesa/transform \
236 -I$(TOP)/src/mesa/swrast \
237 -I$(TOP)/src/mesa/swrast_setup
238
239
240
241 ##### RULES #####
242
243 .c.o:
244 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
245
246 .S.o:
247 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
248
249
250 x86/matypes.h: main/mtypes.h tnl/t_context.h x86/gen_matypes.c
251 $(CC) $(INCLUDE_DIRS) $(CFLAGS) x86/gen_matypes.c -o x86/gen_matypes
252 ./x86/gen_matypes > x86/matypes.h
253 rm -f x86/gen_matypes x86/*.o
254
255 x86/common_x86_asm.o: x86/matypes.h
256
257
258
259 ##### TARGETS #####
260
261 default:
262 @echo "Specify a target configuration"
263
264
265 targets: $(LIBDIR)/$(OSMESA16_LIB)
266
267 # Make the 16-bit/channel OSMesa library
268 $(LIBDIR)/$(OSMESA16_LIB): $(OBJECTS)
269 $(TOP)/bin/mklib $(MAKELIB_FLAGS) -o $(OSMESA_LIB_NAME) -major $(GL_MAJOR) \
270 -minor $(GL_MINOR) -patch $(GL_TINY) -install $(LIBDIR) \
271 $(GL_LIB_DEPS) $(OBJECTS)
272
273
274
275
276 #
277 # Run 'make dep' to update the dependencies if you change what's included
278 # by any source file.
279 #
280 dep: $(CORE_SOURCES) $(OSMESA_DRIVER_SOURCES) $(ASM_SOURCES)
281 makedepend -fdepend -Y $(INCLUDE_DIRS) -DGGI -DSVGA -DFX \
282 $(CORE_SOURCES) $(OSMESA_DRIVER_SOURCES) \
283 $(ASM_SOURCES)
284
285 dep: $(CORE_SOURCES)
286 makedepend -fdepend -Y -I../include $(CORE_SOURCES)
287
288 tags:
289 etags `find . -name \*.[ch]` `find ../include`
290
291
292 # Remove .o and backup files
293 clean:
294 -rm -f *.a
295 -rm -f */*.o */*~ */*.o */*~
296 -rm -f drivers/*/*.o drivers/*/*/*.o
297
298
299 include $(TOP)/Make-config
300
301 include depend