Drop main() prototype. Syncs with NetBSD-8
[minix.git] / external / mit / xorg / lib / libmesa.mk
blob95f4a39bcc10d76cc2b04a4122494344908c9c93
1 # $NetBSD: libmesa.mk,v 1.1 2014/12/18 06:24:28 mrg Exp $
3 # Consumer of this Makefile should set MESA_SRC_MODULES.
5 INCLUDES.all= mapi mesa mesa/main
7 # The source file lists derived from src/mesa/Makefile.sources.
8 # Please keep the organization in line with those files.
10 # Main sources
11 PATHS.main= mesa/main
12 INCLUDES.main= glsl
13 SRCS.main= \
14 api_arrayelt.c \
15 api_loopback.c \
16 api_validate.c \
17 accum.c \
18 arbprogram.c \
19 atifragshader.c \
20 attrib.c \
21 arrayobj.c \
22 blend.c \
23 blit.c \
24 bufferobj.c \
25 buffers.c \
26 clear.c \
27 clip.c \
28 colortab.c \
29 compute.c \
30 condrender.c \
31 context.c \
32 convolve.c \
33 copyimage.c \
34 cpuinfo.c \
35 debug.c \
36 depth.c \
37 dlist.c \
38 drawpix.c \
39 drawtex.c \
40 enable.c \
41 errors.c \
42 MESAeval.c \
43 execmem.c \
44 extensions.c \
45 fbobject.c \
46 feedback.c \
47 ffvertex_prog.c \
48 ff_fragment_shader.cpp \
49 fog.c \
50 formatquery.c \
51 formats.c \
52 format_pack.c \
53 format_unpack.c \
54 format_utils.c \
55 framebuffer.c \
56 get.c \
57 genmipmap.c \
58 getstring.c \
59 glformats.c \
60 hash.c \
61 hint.c \
62 histogram.c \
63 image.c \
64 imports.c \
65 light.c \
66 lines.c \
67 matrix.c \
68 mipmap.c \
69 mm.c \
70 multisample.c \
71 objectlabel.c \
72 pack.c \
73 pbo.c \
74 performance_monitor.c \
75 pipelineobj.c \
76 MESApixel.c \
77 MESApixelstore.c \
78 pixeltransfer.c \
79 points.c \
80 polygon.c \
81 queryobj.c \
82 querymatrix.c \
83 rastpos.c \
84 readpix.c \
85 remap.c \
86 renderbuffer.c \
87 samplerobj.c \
88 scissor.c \
89 set.c \
90 shaderapi.c \
91 shaderimage.c \
92 shaderobj.c \
93 shader_query.cpp \
94 shared.c \
95 state.c \
96 stencil.c \
97 syncobj.c \
98 texcompress.c \
99 texcompress_bptc.c \
100 texcompress_cpal.c \
101 texcompress_rgtc.c \
102 texcompress_s3tc.c \
103 texcompress_fxt1.c \
104 texcompress_etc.c \
105 texenv.c \
106 texformat.c \
107 texgen.c \
108 texgetimage.c \
109 teximage.c \
110 texobj.c \
111 texparam.c \
112 texstate.c \
113 texstorage.c \
114 texstore.c \
115 textureview.c \
116 texturebarrier.c \
117 transformfeedback.c \
118 uniforms.c \
119 uniform_query.cpp \
120 varray.c \
121 vdpau.c \
122 version.c \
123 viewport.c \
124 vtxfmt.c \
125 es1_conversion.c \
127 # Build files
128 .PATH: ${X11SRCDIR.MesaLib}/../src/mesa/main
129 SRCS.main+= \
130 enums.c \
131 api_exec.c \
133 # XXX avoid source name clashes with glx
134 .PATH: ${X11SRCDIR.MesaLib}/src/mesa/main
135 BUILDSYMLINKS+= ${X11SRCDIR.MesaLib}/src/mesa/main/pixel.c MESApixel.c \
136 ${X11SRCDIR.MesaLib}/src/mesa/main/pixelstore.c MESApixelstore.c \
137 ${X11SRCDIR.MesaLib}/src/mesa/main/eval.c MESAeval.c
139 # Math sources
140 PATHS.math= mesa/math
141 SRCS.math= \
142 m_debug_clip.c \
143 m_debug_norm.c \
144 m_debug_xform.c \
145 m_eval.c \
146 m_matrix.c \
147 m_translate.c \
148 m_vector.c
150 PATHS.math_xform= mesa/math
151 SRCS.math_xform= \
152 m_xform.c
155 # VBO sources
156 PATHS.vbo= mesa/vbo
157 INCLUDES.vbo= gallium/auxiliary
158 SRCS.vbo= \
159 vbo_context.c \
160 vbo_exec.c \
161 vbo_exec_api.c \
162 vbo_exec_array.c \
163 vbo_exec_draw.c \
164 vbo_exec_eval.c \
165 vbo_noop.c \
166 vbo_primitive_restart.c \
167 vbo_rebase.c \
168 vbo_split.c \
169 vbo_split_copy.c \
170 vbo_split_inplace.c \
171 vbo_save.c \
172 vbo_save_api.c \
173 vbo_save_draw.c \
174 vbo_save_loopback.c
176 # TNL sources
177 PATHS.tnl= mesa/tnl
178 SRCS.tnl= \
179 t_context.c \
180 t_pipeline.c \
181 t_draw.c \
182 t_rasterpos.c \
183 t_vb_program.c \
184 t_vb_render.c \
185 t_vb_texgen.c \
186 t_vb_texmat.c \
187 t_vb_vertex.c \
188 t_vb_fog.c \
189 t_vb_light.c \
190 t_vb_normals.c \
191 t_vb_points.c \
192 t_vp_build.c \
193 t_vertex.c \
194 t_vertex_sse.c \
195 t_vertex_generic.c
198 # Software raster sources
199 PATHS.swrast= mesa/swrast
200 SRCS.swrast= \
201 s_aaline.c \
202 s_aatriangle.c \
203 s_alpha.c \
204 s_atifragshader.c \
205 s_bitmap.c \
206 s_blend.c \
207 s_blit.c \
208 s_clear.c \
209 s_copypix.c \
210 s_context.c \
211 s_depth.c \
212 s_drawpix.c \
213 s_feedback.c \
214 s_fog.c \
215 s_fragprog.c \
216 s_lines.c \
217 s_logic.c \
218 s_masking.c \
219 s_points.c \
220 s_renderbuffer.c \
221 s_span.c \
222 s_stencil.c \
223 s_texcombine.c \
224 s_texfetch.c \
225 s_texfilter.c \
226 s_texrender.c \
227 s_texture.c \
228 s_triangle.c \
229 s_zoom.c
232 # swrast_setup
233 PATHS.ss= mesa/swrast_setup
234 SRCS.ss= \
235 ss_context.c \
236 ss_triangle.c
239 # Common driver sources
240 PATHS.common= mesa/drivers/common
241 SRCS.common= \
242 driverfuncs.c \
243 meta_blit.c \
244 meta_copy_image.c \
245 meta_generate_mipmap.c \
246 meta.c
249 # ASM C driver sources
250 PATHS.asm_c= mesa/x86 mesa/x86/rtasm mesa/sparc mesa/x86-64
251 SRCS.asm_c= \
252 common_x86.c \
253 x86_xform.c \
254 3dnow.c \
255 sse.c \
256 x86sse.c \
257 sparc.c \
258 x86-64.c
261 # ASM assembler driver sources
262 PATHS.asm_s= mesa/x86 mesa/x86/rtasm mesa/sparc mesa/x86-64
263 .if ${MACHINE} == "amd64"
264 SRCS.asm_s= \
265 xform4.S
266 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/../src/arch/x86_64
267 .elif ${MACHINE} == "sparc" || ${MACHINE} == "sparc64"
268 SRCS.asm_s= \
269 sparc_clip.S \
270 norm.S \
271 xform.S
272 .elif ${MACHINE} == "i386"
273 SRCS.asm_s= \
274 common_x86_asm.S \
275 x86_xform2.S \
276 x86_xform3.S \
277 x86_xform4.S \
278 x86_cliptest.S \
279 mmx_blend.S \
280 3dnow_xform1.S \
281 3dnow_xform2.S \
282 3dnow_xform3.S \
283 3dnow_xform4.S \
284 3dnow_normal.S \
285 sse_xform1.S \
286 sse_xform2.S \
287 sse_xform3.S \
288 sse_xform4.S \
289 sse_normal.S \
290 read_rgba_span_x86.S
291 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/../src/arch/i386
292 .endif
295 # State tracker sources
296 PATHS.state_tracker= mesa/state_tracker
297 INCLUDES.state_tracker= glsl
298 SRCS.state_tracker= \
299 st_atom.c \
300 st_atom_array.c \
301 st_atom_blend.c \
302 st_atom_clip.c \
303 st_atom_constbuf.c \
304 st_atom_depth.c \
305 st_atom_framebuffer.c \
306 st_atom_msaa.c \
307 st_atom_pixeltransfer.c \
308 st_atom_sampler.c \
309 st_atom_scissor.c \
310 st_atom_shader.c \
311 st_atom_rasterizer.c \
312 st_atom_stipple.c \
313 st_atom_texture.c \
314 st_atom_viewport.c \
315 st_cb_bitmap.c \
316 st_cb_blit.c \
317 st_cb_bufferobjects.c \
318 st_cb_clear.c \
319 st_cb_condrender.c \
320 st_cb_flush.c \
321 st_cb_drawpixels.c \
322 st_cb_drawtex.c \
323 st_cb_eglimage.c \
324 st_cb_fbo.c \
325 st_cb_feedback.c \
326 st_cb_msaa.c \
327 st_cb_program.c \
328 st_cb_queryobj.c \
329 st_cb_rasterpos.c \
330 st_cb_readpixels.c \
331 st_cb_syncobj.c \
332 st_cb_strings.c \
333 st_cb_texture.c \
334 st_cb_texturebarrier.c \
335 st_cb_viewport.c \
336 st_cb_xformfb.c \
337 st_context.c \
338 st_debug.c \
339 st_draw.c \
340 st_draw_feedback.c \
341 st_extensions.c \
342 st_format.c \
343 st_gen_mipmap.c \
344 st_glsl_to_tgsi.cpp \
345 st_manager.c \
346 st_mesa_to_tgsi.c \
347 st_program.c \
348 st_texture.c \
349 st_vdpau.c
352 # Program sources
353 PATHS.program= mesa/program
354 INCLUDES.program= glsl
355 SRCS.program= \
356 arbprogparse.c \
357 prog_hash_table.c \
358 ir_to_mesa.cpp \
359 program.c \
360 program_parse_extra.c \
361 prog_cache.c \
362 prog_execute.c \
363 prog_instruction.c \
364 prog_noise.c \
365 prog_optimize.c \
366 prog_opt_constant_fold.c \
367 prog_parameter.c \
368 prog_parameter_layout.c \
369 prog_print.c \
370 prog_statevars.c \
371 programopt.c \
372 register_allocate.c \
373 sampler.cpp \
374 string_to_uint_map.cpp \
375 symbol_table.c \
376 program_lexer.l
378 # Generated
379 .PATH: ${X11SRCDIR.MesaLib}/../src/mesa/program
380 SRCS.program+= \
381 program_parse.tab.c
384 # Run throught all the modules and setup the SRCS and CPPFLAGS etc.
385 .for _mod_ in ${MESA_SRC_MODULES}
387 SRCS+= ${SRCS.${_mod_}}
389 . for _path_ in ${PATHS.${_mod_}}
390 .PATH: ${X11SRCDIR.MesaLib}/src/${_path_}
391 . endfor
393 . for _path_ in ${INCLUDES.${_mod_}}
394 . for _s in ${SRCS.${_mod_}}
395 CPPFLAGS.${_s}+= -I${X11SRCDIR.MesaLib}/src/${_path_}
396 . endfor
397 . endfor
399 .endfor
401 .for _path_ in ${INCLUDES.all}
402 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src/${_path_}
403 .endfor
405 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/include
406 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src
407 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src/mesa
408 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src/mesa/main
409 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src/mapi
410 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src/gallium/include
411 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/../src/mapi/glapi
412 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/../src/mesa
413 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/../src/mesa/main
414 CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src/mesa/drivers/dri/common
416 CPPFLAGS+= \
417 -DPACKAGE_NAME=\"Mesa\" \
418 -DPACKAGE_TARNAME=\"mesa\" \
419 -DPACKAGE_VERSION=\"10.3.5\" \
420 -DPACKAGE_STRING=\"Mesa\ 10.3.5\" \
421 -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" \
422 -DPACKAGE_URL=\"\" \
423 -DPACKAGE=\"mesa\" \
424 -DVERSION=\"10.3.5\"
426 #__MINIX: No Pthreads: -DHAVE_PTHREAD=1
427 CPPFLAGS+= \
428 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 \
429 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 \
430 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 \
431 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE___BUILTIN_BSWAP32=1 \
432 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 \
433 -DHAVE_POSIX_MEMALIGN -DHAVE_DLOPEN
435 .include "../asm.mk"
437 CPPFLAGS+= \
438 -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DMESA_EGL_NO_X11_HEADERS
440 CPPFLAGS+= \
441 -DUSE_EXTERNAL_DXTN_LIB=1 \
442 -DYYTEXT_POINTER=1
444 CFLAGS+= -fvisibility=hidden -fno-strict-aliasing -fno-builtin-memcmp