Remove building with NOCRYPTO option
[minix.git] / external / mit / xorg / lib / gallium / Makefile
blob4c799eebe03d09ae3d59ffef61681b646c4e4871
1 # $NetBSD: Makefile,v 1.7 2015/09/23 05:28:14 mrg Exp $
3 # Link the gallium mega driver.
5 LIBISMODULE= yes
6 LIBISCXX= yes
8 .include <bsd.own.mk>
10 SHLIB_MAJOR= 0
12 LIB= gallium_dri
13 DRIDIR= ${X11USRLIBDIR}/modules/dri
14 DRIDEBUGDIR= ${DEBUGDIR}${X11USRLIBDIR}/modules/dri
16 DRIVERS= kms_swrast swrast
17 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
18 DRIVERS+= r600
19 .endif
21 CPPFLAGS+= \
22 -I${DESTDIR}${X11INCDIR}/libdrm
24 # cargo culted.
25 #CPPFLAGS+= -D_NETBSD_SOURCE -DPTHREADS
27 GALLIUM_SUBDIRS= \
28 auxiliary \
29 auxiliary/cso_cache \
30 auxiliary/draw \
31 auxiliary/hud \
32 auxiliary/indices \
33 auxiliary/os \
34 auxiliary/pipebuffer \
35 auxiliary/postprocess \
36 auxiliary/rbug \
37 auxiliary/rtasm \
38 auxiliary/tgsi \
39 auxiliary/translate \
40 auxiliary/util \
41 auxiliary/vl \
42 drivers/galahad \
43 drivers/identity \
44 drivers/noop \
45 drivers/trace \
46 drivers/rbug \
47 drivers/radeon \
48 drivers/r600 \
49 drivers/r600/sb \
50 drivers/softpipe \
51 winsys/radeon/drm \
52 winsys/sw/null \
53 winsys/sw/dri \
54 winsys/sw/kms-dri \
55 state_trackers/dri
57 GALLIUM_SOURCES.auxiliary/cso_cache= \
58 cso_cache.c \
59 cso_context.c \
60 cso_hash.c
61 GALLIUM_SOURCES.auxiliary/draw= \
62 draw_context.c \
63 draw_fs.c \
64 draw_gs.c \
65 draw_pipe.c \
66 draw_pipe_aaline.c \
67 draw_pipe_aapoint.c \
68 draw_pipe_clip.c \
69 draw_pipe_cull.c \
70 draw_pipe_flatshade.c \
71 draw_pipe_offset.c \
72 draw_pipe_pstipple.c \
73 draw_pipe_stipple.c \
74 draw_pipe_twoside.c \
75 draw_pipe_unfilled.c \
76 draw_pipe_util.c \
77 draw_pipe_validate.c \
78 draw_pipe_vbuf.c \
79 draw_pipe_wide_line.c \
80 draw_pipe_wide_point.c \
81 draw_prim_assembler.c \
82 draw_pt.c \
83 draw_pt_emit.c \
84 draw_pt_fetch.c \
85 draw_pt_fetch_emit.c \
86 draw_pt_fetch_shade_emit.c \
87 draw_pt_fetch_shade_pipeline.c \
88 draw_pt_post_vs.c \
89 draw_pt_so_emit.c \
90 draw_pt_util.c \
91 draw_pt_vsplit.c \
92 draw_vertex.c \
93 draw_vs.c \
94 draw_vs_exec.c \
95 draw_vs_variant.c
96 GALLIUM_SOURCES.auxiliary/hud= \
97 font.c \
98 hud_context.c \
99 hud_cpu.c \
100 hud_fps.c \
101 hud_driver_query.c
102 GALLIUM_SOURCES.auxiliary/indices= \
103 u_primconvert.c
104 GALLIUM_SOURCES.auxiliary/os= \
105 os_misc.c \
106 os_process.c \
107 os_time.c
108 GALLIUM_SOURCES.auxiliary/pipebuffer= \
109 pb_buffer_fenced.c \
110 pb_buffer_malloc.c \
111 pb_bufmgr_alt.c \
112 pb_bufmgr_cache.c \
113 pb_bufmgr_debug.c \
114 pb_bufmgr_mm.c \
115 pb_bufmgr_ondemand.c \
116 pb_bufmgr_pool.c \
117 pb_bufmgr_slab.c \
118 pb_validate.c
119 GALLIUM_SOURCES.auxiliary/postprocess= \
120 pp_celshade.c \
121 pp_colors.c \
122 pp_init.c \
123 pp_mlaa.c \
124 pp_run.c \
125 pp_program.c
126 GALLIUM_SOURCES.auxiliary/rbug= \
127 rbug_connection.c \
128 rbug_context.c \
129 rbug_core.c \
130 rbug_demarshal.c \
131 rbug_texture.c \
132 rbug_shader.c
133 GALLIUM_SOURCES.auxiliary/rtasm= \
134 rtasm_cpu.c \
135 rtasm_execmem.c \
136 rtasm_x86sse.c
137 GALLIUM_SOURCES.auxiliary/tgsi= \
138 tgsi_build.c \
139 tgsi_dump.c \
140 tgsi_exec.c \
141 tgsi_info.c \
142 tgsi_iterate.c \
143 tgsi_parse.c \
144 tgsi_sanity.c \
145 tgsi_scan.c \
146 tgsi_strings.c \
147 tgsi_text.c \
148 tgsi_transform.c \
149 tgsi_ureg.c \
150 tgsi_util.c
151 GALLIUM_SOURCES.auxiliary/translate= \
152 translate.c \
153 translate_cache.c \
154 translate_generic.c \
155 translate_sse.c
156 GALLIUM_SOURCES.auxiliary/util= \
157 u_debug.c \
158 u_debug_describe.c \
159 u_debug_flush.c \
160 u_debug_memory.c \
161 u_debug_refcnt.c \
162 u_debug_stack.c \
163 u_debug_symbol.c \
164 u_dump_defines.c \
165 u_dump_state.c \
166 u_bitmask.c \
167 u_blit.c \
168 u_blitter.c \
169 u_cache.c \
170 u_caps.c \
171 u_cpu_detect.c \
172 u_dl.c \
173 u_draw.c \
174 u_draw_quad.c \
175 u_format.c \
176 u_format_other.c \
177 u_format_latc.c \
178 u_format_s3tc.c \
179 u_format_rgtc.c \
180 u_format_etc.c \
181 u_format_bptc.c \
182 u_format_tests.c \
183 u_format_yuv.c \
184 u_format_zs.c \
185 u_framebuffer.c \
186 u_gen_mipmap.c \
187 u_handle_table.c \
188 u_hash.c \
189 u_hash_table.c \
190 u_helpers.c \
191 u_index_modify.c \
192 u_keymap.c \
193 u_linear.c \
194 u_linkage.c \
195 u_network.c \
196 u_math.c \
197 u_mm.c \
198 u_pstipple.c \
199 u_ringbuffer.c \
200 u_sampler.c \
201 u_simple_shaders.c \
202 u_slab.c \
203 u_snprintf.c \
204 u_staging.c \
205 u_suballoc.c \
206 u_surface.c \
207 u_surfaces.c \
208 u_texture.c \
209 u_tile.c \
210 u_transfer.c \
211 u_resource.c \
212 u_upload_mgr.c \
213 u_vbuf.c
214 GALLIUM_SOURCES.auxiliary/vl= \
215 vl_csc.c \
216 vl_compositor.c \
217 vl_matrix_filter.c \
218 vl_median_filter.c \
219 vl_decoder.c \
220 vl_mpeg12_decoder.c \
221 vl_mpeg12_bitstream.c \
222 vl_zscan.c \
223 vl_idct.c \
224 vl_mc.c \
225 vl_vertex_buffers.c \
226 vl_video_buffer.c \
227 vl_deint_filter.c
229 # Generated
230 .PATH: ${X11SRCDIR.MesaLib}/../src/gallium/auxiliary
231 GALLIUM_SOURCES.auxiliary= \
232 u_indices_gen.c \
233 u_unfilled_gen.c \
234 u_format_table.c
235 .for _f in ${GALLIUM_SOURCES.auxiliary}
236 CPPFLAGS.${_f} += -I${X11SRCDIR.MesaLib}/src/gallium/auxiliary/util
237 .endfor
239 GALLIUM_SOURCES.drivers/galahad= \
240 glhd_objects.c \
241 glhd_context.c \
242 glhd_screen.c
244 GALLIUM_SOURCES.drivers/identity = \
245 id_objects.c \
246 id_context.c \
247 id_screen.c
249 GALLIUM_SOURCES.drivers/noop = \
250 noop_pipe.c \
251 noop_state.c
253 GALLIUM_SOURCES.drivers/trace = \
254 tr_context.c \
255 tr_dump.c \
256 tr_dump_state.c \
257 tr_screen.c \
258 tr_texture.c
260 GALLIUM_SOURCES.drivers/rbug = \
261 DRIVERrbug_core.c \
262 DRIVERrbug_context.c \
263 rbug_objects.c \
264 rbug_screen.c
265 # Conflicts with auxiliary/rbug/ files
266 BUILDSYMLINKS+= ${X11SRCDIR.MesaLib}/src/gallium/drivers/rbug/rbug_core.c DRIVERrbug_core.c
267 BUILDSYMLINKS+= ${X11SRCDIR.MesaLib}/src/gallium/drivers/rbug/rbug_context.c DRIVERrbug_context.c
268 CPPFLAGS.DRIVERrbug_core.c+= -I${X11SRCDIR.MesaLib}/src/gallium/auxiliary
269 CPPFLAGS.DRIVERrbug_core.c+= -I${X11SRCDIR.MesaLib}/src/gallium/drivers/rbug
270 CPPFLAGS.DRIVERrbug_core.c+= -I${X11SRCDIR.MesaLib}/src/gallium/drivers
271 CPPFLAGS.DRIVERrbug_context.c+= -I${X11SRCDIR.MesaLib}/src/gallium/auxiliary
272 CPPFLAGS.DRIVERrbug_context.c+= -I${X11SRCDIR.MesaLib}/src/gallium/drivers/rbug
273 CPPFLAGS.DRIVERrbug_context.c+= -I${X11SRCDIR.MesaLib}/src/gallium/drivers
275 GALLIUM_SOURCES.drivers/radeon = \
276 cayman_msaa.c \
277 r600_buffer_common.c \
278 r600_pipe_common.c \
279 r600_query.c \
280 r600_streamout.c \
281 r600_texture.c \
282 radeon_video.c \
283 radeon_uvd.c \
284 radeon_vce.c \
285 radeon_vce_40_2_2.c
286 #LLVM_C_FILES := \
287 # radeon_elf_util.c \
288 # radeon_setup_tgsi_llvm.c \
289 # radeon_llvm_emit.c \
290 # radeon_llvm_util.c
292 GALLIUM_SOURCES.drivers/r600 = \
293 r600_asm.c \
294 r600_blit.c \
295 r600_hw_context.c \
296 r600_isa.c \
297 r600_pipe.c \
298 r600_shader.c \
299 r600_state.c \
300 r700_asm.c \
301 evergreen_hw_context.c \
302 evergreen_state.c \
303 eg_asm.c \
304 r600_state_common.c \
305 evergreen_compute.c \
306 compute_memory_pool.c \
307 r600_uvd.c
308 GALLIUM_SOURCES.drivers/r600/sb = \
309 sb_bc_builder.cpp \
310 sb_bc_decoder.cpp \
311 sb_bc_dump.cpp \
312 sb_bc_finalize.cpp \
313 sb_bc_parser.cpp \
314 sb_context.cpp \
315 sb_core.cpp \
316 sb_dce_cleanup.cpp \
317 sb_def_use.cpp \
318 sb_dump.cpp \
319 sb_expr.cpp \
320 sb_gcm.cpp \
321 sb_gvn.cpp \
322 sb_if_conversion.cpp \
323 sb_ir.cpp \
324 sb_liveness.cpp \
325 sb_pass.cpp \
326 sb_peephole.cpp \
327 sb_psi_ops.cpp \
328 sb_ra_checker.cpp \
329 sb_ra_coalesce.cpp \
330 sb_ra_init.cpp \
331 sb_sched.cpp \
332 sb_shader.cpp \
333 sb_ssa_builder.cpp \
334 sb_valtable.cpp
335 #LLVM_C_SOURCES = r600_llvm.c
337 .for _f in ${GALLIUM_SOURCES.drivers/r600} ${GALLIUM_SOURCES.drivers/r600/sb}
338 CPPFLAGS.${_f} += -I${X11SRCDIR.MesaLib}/src/gallium/drivers/r600
339 .endfor
343 GALLIUM_SOURCES.winsys/radeon/drm = \
344 radeon_drm_bo.c \
345 radeon_drm_cs.c \
346 radeon_drm_cs_dump.c \
347 radeon_drm_winsys.c
349 GALLIUM_SOURCES.drivers/softpipe = \
350 sp_fs_exec.c \
351 sp_clear.c \
352 sp_fence.c \
353 sp_flush.c \
354 sp_query.c \
355 sp_context.c \
356 sp_draw_arrays.c \
357 sp_prim_vbuf.c \
358 sp_quad_pipe.c \
359 sp_quad_stipple.c \
360 sp_quad_depth_test.c \
361 sp_quad_fs.c \
362 sp_quad_blend.c \
363 sp_screen.c \
364 sp_setup.c \
365 sp_state_blend.c \
366 sp_state_clip.c \
367 sp_state_derived.c \
368 sp_state_sampler.c \
369 sp_state_shader.c \
370 sp_state_so.c \
371 sp_state_rasterizer.c \
372 sp_state_surface.c \
373 sp_state_vertex.c \
374 sp_texture.c \
375 sp_tex_sample.c \
376 sp_tex_tile_cache.c \
377 sp_tile_cache.c \
378 sp_surface.c
380 GALLIUM_SOURCES.winsys/sw/null = \
381 null_sw_winsys.c
383 GALLIUM_SOURCES.winsys/sw/dri = \
384 dri_sw_winsys.c
386 GALLIUM_SOURCES.winsys/sw/kms-dri = \
387 kms_dri_sw_winsys.c
389 GALLIUM_SOURCES.state_trackers/dri = \
390 dri_context.c \
391 dri_drawable.c \
392 dri_query_renderer.c \
393 dri_screen.c \
394 drisw.c \
395 dri2.c
396 .for _f in ${GALLIUM_SOURCES.state_trackers/dri}
397 CPPFLAGS.${_f} += -I${X11SRCDIR.MesaLib}/src/gallium/state_trackers/dri/common
398 .endfor
400 # missing
401 CPPFLAGS+= \
402 -DGALLIUM_SOFTPIPE \
403 -DGALLIUM_STATIC_TARGETS=1 \
404 -DMESA_EGL_NO_X11_HEADERS \
406 .for _d in ${GALLIUM_SUBDIRS}
407 SRCS+= ${GALLIUM_SOURCES.${_d}}
408 .PATH: ${X11SRCDIR.MesaLib}/src/gallium/${_d}
409 .endfor
411 #. if defined(${GALLIUM_SOURCES.${_d}})
412 #SRCS+= ${GALLIUM_SOURCES.${_d}}
413 #. endif
415 .include "../libloader.mk"
417 LIBDPLIBS+= m ${.CURDIR}/../../../../../lib/libm
418 LIBDPLIBS+= drm ${.CURDIR}/../libdrm
419 LIBDPLIBS+= drm_radeon ${.CURDIR}/../libdrm_radeon
420 LIBDPLIBS+= glapi ${.CURDIR}/../libglapi
421 LIBDPLIBS+= expat ${.CURDIR}/../../../../../external/mit/expat/lib/libexpat
423 LDFLAGS+= -Wl,--version-script=${X11SRCDIR.MesaLib}/src/gallium/targets/dri/dri.sym
425 ## build mesagallium parts
426 MESA_SRC_MODULES= main math vbo state_tracker program asm_s
427 .include "../libmesa.mk"
428 .include "../libglsl.mk"
430 # Special addition for just gallium; it misses the rest of asm_c files.
431 .PATH: ${X11SRCDIR.MesaLib}/src/mesa/x86
432 SRCS+= common_x86.c
434 .if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
435 SRCS+= streaming-load-memcpy.c
436 CFLAGS.streaming-load-memcpy.c+= -msse4.1
437 .endif
439 .include "../driver.mk"
442 .PATH: ${X11SRCDIR.MesaLib}/src/gallium/targets/dri
443 SRCS+= target.c
445 CPPFLAGS+= \
446 -I${X11SRCDIR.MesaLib}/src/gallium/include \
447 -I${X11SRCDIR.MesaLib}/src/gallium/auxiliary \
448 -I${X11SRCDIR.MesaLib}/src/gallium/drivers \
449 -I${X11SRCDIR.MesaLib}/../src/mesa/drivers/dri/common
451 CPPFLAGS.target.c += \
452 -DDRI_TARGET \
453 -DGALLIUM_GALAHAD \
454 -DGALLIUM_NOOP \
455 -DGALLIUM_RBUG \
456 -DGALLIUM_TRACE \
457 -DGALLIUM_R200 \
458 -DGALLIUM_R600 \
459 -DGALLIUM_SOFTPIPE \
460 -I${X11SRCDIR.MesaLib}/src/gallium/state_trackers/dri \
461 -I${X11SRCDIR.MesaLib}/src/loader \
462 -I${X11SRCDIR.MesaLib}/src/gallium/winsys
464 CWARNFLAGS.clang+= -Wno-error=constant-conversion \
465 -Wno-error=tautological-constant-out-of-range-compare \
466 -Wno-error=pointer-sign \
467 -Wno-error=switch \
468 -Wno-error=absolute-value \
469 -Wno-error=tautological-compare \
470 -Wno-error=static-in-inline
472 .include <bsd.x11.mk>
473 LIBDIR= ${X11USRLIBDIR}/modules/dri
475 .for _d in ${DRIVERS}
476 SYMLINKS+= gallium_dri.so ${DRIDIR}/${_d}_dri.so
477 SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so.${SHLIB_MAJOR}
478 .if ${MKDEBUG} != "no"
479 SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHLIB_MAJOR}.debug
480 .endif
481 .endfor
483 .include <bsd.lib.mk>
484 # Don't regenerate c files
485 .y.c: