mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-bd2375399180198b777d0dc9da4eba660b5e2afb / contrib / gallium_auxiliary.sh
blob89f228eb24b9ef7c79fe35d9105c1d925dd82196
1 printf "\tbuilding gallium auxiliary sub-components-->\n"
2 #===============================================================================
3 mkdir -p $build_dir/src/gallium/auxiliary
4 #-------------------------------------------------------------------------------
5 # filenames should be different since we build in one directory
6 libgallium_c_pathnames="\
7 $src_dir/src/gallium/auxiliary/cso_cache/cso_cache.c \
8 $src_dir/src/gallium/auxiliary/cso_cache/cso_cache.h \
9 $src_dir/src/gallium/auxiliary/cso_cache/cso_context.c \
10 $src_dir/src/gallium/auxiliary/cso_cache/cso_hash.c \
11 $src_dir/src/gallium/auxiliary/draw/draw_context.c \
12 $src_dir/src/gallium/auxiliary/draw/draw_fs.c \
13 $src_dir/src/gallium/auxiliary/draw/draw_gs.c \
14 $src_dir/src/gallium/auxiliary/draw/draw_mesh.c \
15 $src_dir/src/gallium/auxiliary/draw/draw_mesh_prim.c \
16 $src_dir/src/gallium/auxiliary/draw/draw_pipe_aaline.c \
17 $src_dir/src/gallium/auxiliary/draw/draw_pipe_aapoint.c \
18 $src_dir/src/gallium/auxiliary/draw/draw_pipe.c \
19 $src_dir/src/gallium/auxiliary/draw/draw_pipe_clip.c \
20 $src_dir/src/gallium/auxiliary/draw/draw_pipe_cull.c \
21 $src_dir/src/gallium/auxiliary/draw/draw_pipe_flatshade.c \
22 $src_dir/src/gallium/auxiliary/draw/draw_pipe_offset.c \
23 $src_dir/src/gallium/auxiliary/draw/draw_pipe_pstipple.c \
24 $src_dir/src/gallium/auxiliary/draw/draw_pipe_stipple.c \
25 $src_dir/src/gallium/auxiliary/draw/draw_pipe_twoside.c \
26 $src_dir/src/gallium/auxiliary/draw/draw_pipe_unfilled.c \
27 $src_dir/src/gallium/auxiliary/draw/draw_pipe_user_cull.c \
28 $src_dir/src/gallium/auxiliary/draw/draw_pipe_util.c \
29 $src_dir/src/gallium/auxiliary/draw/draw_pipe_validate.c \
30 $src_dir/src/gallium/auxiliary/draw/draw_pipe_vbuf.c \
31 $src_dir/src/gallium/auxiliary/draw/draw_pipe_wide_line.c \
32 $src_dir/src/gallium/auxiliary/draw/draw_pipe_wide_point.c \
33 $src_dir/src/gallium/auxiliary/draw/draw_prim_assembler.c \
34 $src_dir/src/gallium/auxiliary/draw/draw_private.h \
35 $src_dir/src/gallium/auxiliary/draw/draw_pt.c \
36 $src_dir/src/gallium/auxiliary/draw/draw_pt_emit.c \
37 $src_dir/src/gallium/auxiliary/draw/draw_pt_fetch.c \
38 $src_dir/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c \
39 $src_dir/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c \
40 $src_dir/src/gallium/auxiliary/draw/draw_pt_mesh_pipeline.c \
41 $src_dir/src/gallium/auxiliary/draw/draw_pt_post_vs.c \
42 $src_dir/src/gallium/auxiliary/draw/draw_pt_so_emit.c \
43 $src_dir/src/gallium/auxiliary/draw/draw_pt_util.c \
44 $src_dir/src/gallium/auxiliary/draw/draw_pt_vsplit.c \
45 $src_dir/src/gallium/auxiliary/draw/draw_tess.c \
46 $src_dir/src/gallium/auxiliary/draw/draw_vertex.c \
47 $src_dir/src/gallium/auxiliary/draw/draw_vs.c \
48 $src_dir/src/gallium/auxiliary/draw/draw_vs_exec.c \
49 $src_dir/src/gallium/auxiliary/draw/draw_vs_variant.c \
50 $src_dir/src/gallium/auxiliary/driver_ddebug/dd_context.c \
51 $src_dir/src/gallium/auxiliary/driver_ddebug/dd_draw.c \
52 $src_dir/src/gallium/auxiliary/driver_ddebug/dd_screen.c \
53 $src_dir/src/gallium/auxiliary/driver_noop/noop_pipe.c \
54 $src_dir/src/gallium/auxiliary/driver_noop/noop_state.c \
55 $src_dir/src/gallium/auxiliary/driver_trace/tr_context.c \
56 $src_dir/src/gallium/auxiliary/driver_trace/tr_dump.c \
57 $src_dir/src/gallium/auxiliary/driver_trace/tr_dump_state.c \
58 $src_dir/src/gallium/auxiliary/driver_trace/tr_public.h \
59 $src_dir/src/gallium/auxiliary/driver_trace/tr_screen.c \
60 $src_dir/src/gallium/auxiliary/driver_trace/tr_texture.c \
61 $src_dir/src/gallium/auxiliary/driver_trace/tr_video.c \
62 $build_dir/src/gallium/auxiliary/driver_trace/tr_util.c \
63 $src_dir/src/gallium/auxiliary/hud/font.c \
64 $src_dir/src/gallium/auxiliary/hud/hud_context.c \
65 $src_dir/src/gallium/auxiliary/hud/hud_cpu.c \
66 $src_dir/src/gallium/auxiliary/hud/hud_nic.c \
67 $src_dir/src/gallium/auxiliary/hud/hud_cpufreq.c \
68 $src_dir/src/gallium/auxiliary/hud/hud_diskstat.c \
69 $src_dir/src/gallium/auxiliary/hud/hud_sensors_temp.c \
70 $src_dir/src/gallium/auxiliary/hud/hud_driver_query.c \
71 $src_dir/src/gallium/auxiliary/hud/hud_fps.c \
72 $build_dir/src/gallium/auxiliary/indices/u_indices_gen.c \
73 $src_dir/src/gallium/auxiliary/indices/u_primconvert.c \
74 $build_dir/src/gallium/auxiliary/indices/u_unfilled_gen.c \
75 $src_dir/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c \
76 $src_dir/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c \
77 $src_dir/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c \
78 $src_dir/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c \
79 $src_dir/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c \
80 $src_dir/src/gallium/auxiliary/pipebuffer/pb_cache.c \
81 $src_dir/src/gallium/auxiliary/pipebuffer/pb_slab.c \
82 $src_dir/src/gallium/auxiliary/pipebuffer/pb_validate.c \
83 $src_dir/src/gallium/auxiliary/postprocess/pp_celshade.c \
84 $src_dir/src/gallium/auxiliary/postprocess/pp_colors.c \
85 $src_dir/src/gallium/auxiliary/postprocess/pp_colors.h \
86 $src_dir/src/gallium/auxiliary/postprocess/pp_init.c \
87 $src_dir/src/gallium/auxiliary/postprocess/pp_mlaa.c \
88 $src_dir/src/gallium/auxiliary/postprocess/pp_program.c \
89 $src_dir/src/gallium/auxiliary/postprocess/pp_run.c \
90 $src_dir/src/gallium/auxiliary/rtasm/rtasm_execmem.c \
91 $src_dir/src/gallium/auxiliary/rtasm/rtasm_x86sse.c \
92 $src_dir/src/gallium/auxiliary/tgsi/tgsi_aa_point.c \
93 $src_dir/src/gallium/auxiliary/tgsi/tgsi_build.c \
94 $src_dir/src/gallium/auxiliary/tgsi/tgsi_dump.c \
95 $src_dir/src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c \
96 $src_dir/src/gallium/auxiliary/tgsi/tgsi_exec.c \
97 $src_dir/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c \
98 $src_dir/src/gallium/auxiliary/tgsi/tgsi_info.c \
99 $src_dir/src/gallium/auxiliary/tgsi/tgsi_iterate.c \
100 $src_dir/src/gallium/auxiliary/tgsi/tgsi_lowering.c \
101 $src_dir/src/gallium/auxiliary/tgsi/tgsi_parse.c \
102 $src_dir/src/gallium/auxiliary/tgsi/tgsi_point_sprite.c \
103 $src_dir/src/gallium/auxiliary/tgsi/tgsi_sanity.c \
104 $src_dir/src/gallium/auxiliary/tgsi/tgsi_scan.c \
105 $src_dir/src/gallium/auxiliary/tgsi/tgsi_strings.c \
106 $src_dir/src/gallium/auxiliary/tgsi/tgsi_text.c \
107 $src_dir/src/gallium/auxiliary/tgsi/tgsi_transform.c \
108 $src_dir/src/gallium/auxiliary/tgsi/tgsi_two_side.c \
109 $src_dir/src/gallium/auxiliary/tgsi/tgsi_ureg.c \
110 $src_dir/src/gallium/auxiliary/tgsi/tgsi_util.c \
111 $src_dir/src/gallium/auxiliary/tgsi/tgsi_vpos.c \
112 $src_dir/src/gallium/auxiliary/translate/translate.c \
113 $src_dir/src/gallium/auxiliary/translate/translate_cache.c \
114 $src_dir/src/gallium/auxiliary/translate/translate_generic.c \
115 $src_dir/src/gallium/auxiliary/translate/translate_sse.c \
116 $src_dir/src/gallium/auxiliary/util/u_async_debug.c \
117 $src_dir/src/gallium/auxiliary/util/u_bitmask.c \
118 $src_dir/src/gallium/auxiliary/util/u_blitter.c \
119 $src_dir/src/gallium/auxiliary/util/u_cache.c \
120 $src_dir/src/gallium/auxiliary/util/u_compute.c \
121 $src_dir/src/gallium/auxiliary/util/u_debug_describe.c \
122 $src_dir/src/gallium/auxiliary/util/u_debug_flush.c \
123 $src_dir/src/gallium/auxiliary/util/u_debug_image.c \
124 $src_dir/src/gallium/auxiliary/util/u_debug_refcnt.c \
125 $src_dir/src/gallium/auxiliary/util/u_draw.c \
126 $src_dir/src/gallium/auxiliary/util/u_draw_quad.c \
127 $src_dir/src/gallium/auxiliary/util/u_driconf.c \
128 $src_dir/src/gallium/auxiliary/util/u_dump_defines.c \
129 $src_dir/src/gallium/auxiliary/util/u_dump_state.c \
130 $src_dir/src/gallium/auxiliary/util/u_framebuffer.c \
131 $src_dir/src/gallium/auxiliary/util/u_gen_mipmap.c \
132 $src_dir/src/gallium/auxiliary/util/u_handle_table.c \
133 $src_dir/src/gallium/auxiliary/util/u_helpers.c \
134 $src_dir/src/gallium/auxiliary/util/u_index_modify.c \
135 $src_dir/src/gallium/auxiliary/util/u_live_shader_cache.c \
136 $src_dir/src/gallium/auxiliary/util/u_log.c \
137 $src_dir/src/gallium/auxiliary/util/u_prim.c \
138 $src_dir/src/gallium/auxiliary/util/u_prim_restart.c \
139 $src_dir/src/gallium/auxiliary/util/u_pstipple.c \
140 $src_dir/src/gallium/auxiliary/util/u_resource.c \
141 $src_dir/src/gallium/auxiliary/util/u_sample_positions.c \
142 $src_dir/src/gallium/auxiliary/util/u_sampler.c \
143 $src_dir/src/gallium/auxiliary/util/u_screen.c \
144 $src_dir/src/gallium/auxiliary/util/u_simple_shaders.c \
145 $src_dir/src/gallium/auxiliary/util/u_split_draw.c \
146 $src_dir/src/gallium/auxiliary/util/u_suballoc.c \
147 $src_dir/src/gallium/auxiliary/util/u_surface.c \
148 $src_dir/src/gallium/auxiliary/util/u_tests.c \
149 $src_dir/src/gallium/auxiliary/util/u_texture.c \
150 $src_dir/src/gallium/auxiliary/util/u_tile.c \
151 $src_dir/src/gallium/auxiliary/util/u_transfer.c \
152 $src_dir/src/gallium/auxiliary/util/u_transfer_helper.c \
153 $src_dir/src/gallium/auxiliary/util/u_threaded_context.c \
154 $src_dir/src/gallium/auxiliary/util/u_upload_mgr.c \
155 $src_dir/src/gallium/auxiliary/util/u_vbuf.c \
156 $src_dir/src/gallium/auxiliary/util/u_vertex_state_cache.c \
157 $src_dir/src/gallium/auxiliary/nir/nir_draw_helpers.c \
158 $src_dir/src/gallium/auxiliary/nir/tgsi_to_nir.c \
159 $src_dir/src/gallium/auxiliary/nir/nir_to_tgsi.c \
161 $src_dir/src/gallium/auxiliary/renderonly/renderonly.c"
162 #-------------------------------------------------------------------------------
163 for src_pathname in $libgallium_c_pathnames
165 cpp_filename=$(basename $src_pathname .c).cpp.c
166 printf "CPP $src_pathname --> $build_dir/src/gallium/auxiliary/$cpp_filename\n"
167 $cpp $src_pathname -o $build_dir/src/gallium/auxiliary/$cpp_filename \
168 -I$cc_internal_fixed_incdir \
169 -I$cc_internal_incdir \
170 -I$linux_incdir \
171 -I$syslib_incdir \
173 -I$build_dir/src/gallium/auxiliary/driver_trace \
174 -I$src_dir/src/gallium/auxiliary/driver_trace \
175 -I$build_dir/src/compiler/nir \
176 -I$src_dir/src/compiler/nir \
177 -I$build_dir/src/compiler \
178 -I$src_dir/src/compiler \
179 -I$build_dir/src/gallium/auxiliary/util \
180 -I$src_dir/src/gallium/auxiliary/util \
181 -I$build_dir/src/gallium/auxiliary \
182 -I$src_dir/src/gallium/auxiliary \
183 -I$build_dir/src/gallium/include \
184 -I$src_dir/src/gallium/include \
185 -I$build_dir/src/util \
186 -I$src_dir/src/util \
187 -I$build_dir/src \
188 -I$src_dir/src \
189 -I$build_dir/include \
190 -I$src_dir/include \
192 $syslib_cpp_flags_defs \
193 $linux_cpp_flags_defs \
194 $cc_builtins_cpp_flags_defs \
195 $cc_attributes_cpp_flags_defs \
196 $mesa_cpp_flags_defs \
198 $external_deps_cpp_flags &
199 done
200 #-------------------------------------------------------------------------------
201 wait
202 #------------------------------------------------------------------------------
203 for src_pathname in $libgallium_c_pathnames
205 cpp_filename=$(basename $src_pathname .c).cpp.c
206 asm_filename=$(basename $src_pathname .c).cpp.c.s
207 printf "CC_S $build_dir/src/gallium/auxiliary/$cpp_filename --> $build_dir/src/gallium/auxiliary/$asm_filename\n"
208 $cc_s $build_dir/src/gallium/auxiliary/$cpp_filename -o $build_dir/src/gallium/auxiliary/$asm_filename &
209 done
210 #------------------------------------------------------------------------------
211 wait
212 #------------------------------------------------------------------------------
214 for src_pathname in $libgallium_c_pathnames
216 asm_filename=$(basename $src_pathname .c).cpp.c.s
217 o_filename=$(basename $src_pathname .c).cpp.c.s.o
218 os="$os $build_dir/src/gallium/auxiliary/$o_filename"
219 printf "AS $build_dir/src/gallium/auxiliary/$asm_filename --> $build_dir/src/gallium/auxiliary/$o_filename\n"
220 $as $build_dir/src/gallium/auxiliary/$asm_filename -o $build_dir/src/gallium/auxiliary/$o_filename &
221 done
222 #------------------------------------------------------------------------------
223 wait
224 #------------------------------------------------------------------------------
225 printf "AR RCS $build_dir/libgallium.a $os\n"
226 $ar_rcs $build_dir/libgallium.a $os
227 #===============================================================================
228 mkdir -p $build_dir/src/gallium/auxiliary/pipe-loader
229 #-------------------------------------------------------------------------------
230 # pipe-loader
231 # "backends" declare "devices", each linked to a specific winsys (windows
232 # system):
234 # - drm pipe-loader backend: declare a pipe loader device for each drm
235 # supported piece of hardware. Each pipe loader device gets linked to the
236 # piece of hardware specific winsys. For instance, amdgpu/drm device gets
237 # linked to amdgpu/drm winsys (with the legacy radeon/drm winsys
238 # fallback). The drm backend is include only if HAVE_LIBDRM is defined.
240 # - sw ("software") backend: declare the following devices:
241 # - dri device linked to the dri winsys if HAVE_PIPE_LOADER_DRI is
242 # defined
243 # - kms_dri device linked to the kms_dri winsys if
244 # HAVE_PIPE_LOADER_KMS is defined
245 # - null device linked to the null winsys if DROP_PIPE_LOADER_MISC
246 # is _NOT_ defined
247 # - wrapper device linked to the wrapper winsys if
248 # DROP_PIPE_LOADER_MISC is _NOT_ defined
249 libpipe_loader_static_c_pathnames="\
250 $build_dir/src/gallium/auxiliary/pipe-loader/pipe_loader.c \
252 $src_dir/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c \
254 #-------------------------------------------------------------------------------
255 for src_pathname in $libpipe_loader_static_c_pathnames
257 cpp_filename=$(basename $src_pathname .c).cpp.c
258 printf "CPP $src_pathname --> $build_dir/src/gallium/auxiliary/pipe-loader/$cpp_filename\n"
259 $cpp $src_pathname -o $build_dir/src/gallium/auxiliary/pipe-loader/$cpp_filename \
260 -DGALLIUM_STATIC_TARGETS=1 \
262 -I$cc_internal_fixed_incdir \
263 -I$cc_internal_incdir \
264 -I$linux_incdir \
265 -I$syslib_incdir \
267 -I$build_dir/src/compiler \
268 -I$src_dir/src/compiler \
269 -I$build_dir/src/util \
270 -I$src_dir/src/util \
271 -I$build_dir/src/gallium/auxiliary/pipe-loader \
272 -I$src_dir/src/gallium/auxiliary/pipe-loader \
273 -I$build_dir/src/gallium/winsys \
274 -I$src_dir/src/gallium/winsys \
275 -I$build_dir/src/gallium/auxiliary \
276 -I$src_dir/src/gallium/auxiliary \
277 -I$build_dir/src/gallium/include \
278 -I$src_dir/src/gallium/include \
279 -I$build_dir/src/util \
280 -I$src_dir/src/util \
281 -I$build_dir/src/loader \
282 -I$src_dir/src/loader \
283 -I$build_dir/src \
284 -I$src_dir/src \
285 -I$build_dir/include \
286 -I$src_dir/include \
288 $syslib_cpp_flags_defs \
289 $linux_cpp_flags_defs \
290 $cc_builtins_cpp_flags_defs \
291 $cc_attributes_cpp_flags_defs \
292 $mesa_cpp_flags_defs \
294 $external_deps_cpp_flags &
295 done
296 #-------------------------------------------------------------------------------
297 wait
298 #------------------------------------------------------------------------------
299 for src_pathname in $libpipe_loader_static_c_pathnames
301 cpp_filename=$(basename $src_pathname .c).cpp.c
302 asm_filename=$(basename $src_pathname .c).cpp.c.s
303 printf "CC_S $build_dir/src/gallium/auxiliary/pipe-loader/$cpp_filename --> $build_dir/src/gallium/auxiliary/pipe-loader/$asm_filename\n"
304 $cc_s $build_dir/src/gallium/auxiliary/pipe-loader/$cpp_filename -o $build_dir/src/gallium/auxiliary/pipe-loader/$asm_filename &
305 done
306 #------------------------------------------------------------------------------
307 wait
308 #------------------------------------------------------------------------------
310 for src_pathname in $libpipe_loader_static_c_pathnames
312 asm_filename=$(basename $src_pathname .c).cpp.c.s
313 o_filename=$(basename $src_pathname .c).cpp.c.s.o
314 os="$os $build_dir/src/gallium/auxiliary/pipe-loader/$o_filename"
315 printf "AS $build_dir/src/gallium/auxiliary/pipe-loader/$asm_filename --> $build_dir/src/gallium/auxiliary/pipe-loader/$o_filename\n"
316 $as $build_dir/src/gallium/auxiliary/pipe-loader/$asm_filename -o $build_dir/src/gallium/auxiliary/pipe-loader/$o_filename &
317 done
318 #------------------------------------------------------------------------------
319 wait
320 #------------------------------------------------------------------------------
321 printf "AR RCS $build_dir/libpipe_loader_static.a $os\n"
322 $ar_rcs $build_dir/libpipe_loader_static.a $os
323 #-------------------------------------------------------------------------------
324 #===============================================================================
325 mkdir -p $build_dir/src/gallium/auxiliary/vl
326 #-------------------------------------------------------------------------------
327 # galliumvl
328 # vl=Video Layer, where you can find vdpau/vapi hardware accelerated drivers,
329 # but we do use only the empty stubs
330 printf "CPP $src_dir/src/gallium/auxiliary/vl/vl_stubs.c --> $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c\n"
331 $cpp $src_dir/src/gallium/auxiliary/vl/vl_stubs.c -o $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c \
332 -I$cc_internal_fixed_incdir \
333 -I$cc_internal_incdir \
334 -I$linux_incdir \
335 -I$syslib_incdir \
337 -I$build_dir/src/compiler \
338 -I$src_dir/src/compiler \
339 -I$build_dir/src/gallium/auxiliary \
340 -I$src_dir/src/gallium/auxiliary \
341 -I$build_dir/src/gallium/include \
342 -I$src_dir/src/gallium/include \
343 -I$build_dir/src/util \
344 -I$src_dir/src/util \
345 -I$build_dir/src \
346 -I$src_dir/src \
347 -I$build_dir/include \
348 -I$src_dir/include \
350 $syslib_cpp_flags_defs \
351 $linux_cpp_flags_defs \
352 $cc_builtins_cpp_flags_defs \
353 $cc_attributes_cpp_flags_defs \
354 $mesa_cpp_flags_defs \
356 $external_deps_cpp_flags
357 #------------------------------------------------------------------------------
358 printf "CC_S $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c --> $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c.s\n"
359 $cc_s $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c -o $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c.s
360 #------------------------------------------------------------------------------
361 printf "AS $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c.s --> $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c.s.o\n"
362 $as $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c.s -o $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c.s.o
363 #------------------------------------------------------------------------------
364 printf "AR RCS $build_dir/libgalliumvl.a $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c.s.o\n"
365 $ar_rcs $build_dir/libgalliumvl.a $build_dir/src/gallium/auxiliary/vl/vl_stubs.cpp.c.s.o &
366 #===============================================================================
367 printf "\t<--gallium auxiliary sub-components built\n"