1 echo "building util -->"
2 #===============================================================================
3 mkdir
-p $build_dir/src
/util
/blake3
4 #-------------------------------------------------------------------------------
5 # filenames should be different since we build in one directory
6 libmesa_util_c_pathnames
="\
7 $build_dir/src/util/format_srgb.c \
8 $build_dir/src/util/format/u_format_table.c \
9 $src_dir/src/util/anon_file.c \
10 $src_dir/src/util/bitscan.c \
11 $src_dir/src/util/blake3/blake3.c \
12 $src_dir/src/util/blake3/blake3_dispatch.c \
13 $src_dir/src/util/blake3/blake3_portable.c \
14 $src_dir/src/util/blob.c \
15 $src_dir/src/util/build_id.c \
16 $src_dir/src/util/compress.c \
17 $src_dir/src/util/crc32.c \
18 $src_dir/src/util/disk_cache.c \
19 $src_dir/src/util/disk_cache_os.c \
20 $src_dir/src/util/double.c \
21 $src_dir/src/util/fast_idiv_by_const.c \
22 $src_dir/src/util/fossilize_db.c \
23 $src_dir/src/util/futex.c \
24 $src_dir/src/util/half_float.c \
25 $src_dir/src/util/hash_table.c \
26 $src_dir/src/util/log.c \
27 $src_dir/src/util/mesa-blake3.c \
28 $src_dir/src/util/mesa-sha1.c \
29 $build_dir/src/util/mesa_cache_db.c \
30 $src_dir/src/util/mesa_cache_db_multipart.c \
31 $src_dir/src/util/memstream.c \
32 $src_dir/src/util/os_file.c \
33 $src_dir/src/util/os_time.c \
34 $src_dir/src/util/os_memory_fd.c \
35 $src_dir/src/util/os_misc.c \
36 $src_dir/src/util/os_socket.c \
37 $src_dir/src/util/parson.c \
38 $src_dir/src/util/u_process.c \
39 $src_dir/src/util/sha1/sha1.c \
40 $src_dir/src/util/ralloc.c \
41 $src_dir/src/util/rand_xor.c \
42 $src_dir/src/util/rb_tree.c \
43 $src_dir/src/util/register_allocate.c \
44 $src_dir/src/util/rgtc.c \
45 $src_dir/src/util/rwlock.c \
46 $src_dir/src/util/set.c \
47 $src_dir/src/util/simple_mtx.c \
48 $src_dir/src/util/slab.c \
49 $src_dir/src/util/softfloat.c \
50 $src_dir/src/util/sparse_array.c \
51 $src_dir/src/util/streaming-load-memcpy.c \
52 $src_dir/src/util/string_buffer.c \
53 $src_dir/src/util/strtod.c \
54 $src_dir/src/util/thread_sched.c \
55 $src_dir/src/util/u_atomic.c \
56 $src_dir/src/util/u_dl.c \
57 $src_dir/src/util/u_debug_memory.c \
58 $src_dir/src/util/u_dynarray.c \
59 $src_dir/src/util/u_printf.c \
60 $src_dir/src/util/format/u_format.c \
61 $src_dir/src/util/format/u_format_bptc.c \
62 $src_dir/src/util/format/u_format_etc.c \
63 $src_dir/src/util/format/u_format_fxt1.c \
64 $src_dir/src/util/format/u_format_latc.c \
65 $src_dir/src/util/format/u_format_other.c \
66 $src_dir/src/util/format/u_format_rgtc.c \
67 $src_dir/src/util/format/u_format_s3tc.c \
68 $src_dir/src/util/format/u_format_tests.c \
69 $src_dir/src/util/format/u_format_yuv.c \
70 $src_dir/src/util/format/u_format_zs.c \
71 $src_dir/src/util/u_cpu_detect.c \
72 $src_dir/src/util/u_call_once.c \
73 $src_dir/src/util/u_debug.c \
74 $src_dir/src/util/u_debug_stack.c \
75 $src_dir/src/util/u_debug_symbol.c \
76 $src_dir/src/util/u_hash_table.c \
77 $src_dir/src/util/u_idalloc.c \
78 $src_dir/src/util/u_math.c \
79 $src_dir/src/util/u_mm.c \
80 $src_dir/src/util/u_queue.c \
81 $src_dir/src/util/u_thread.c \
82 $build_dir/src/util/perf/u_trace.c \
83 $src_dir/src/util/u_vector.c \
84 $src_dir/src/util/u_worklist.c \
85 $src_dir/src/util/vma.c \
87 $src_dir/src/c11/impl/threads_posix.c \
88 $src_dir/src/c11/impl/time.c \
90 # from the trashiest and toxiciest coders:
91 libmesa_util_cxx_pathnames
="\
92 $src_dir/src/util/texcompress_astc_luts.cpp \
93 $src_dir/src/util/texcompress_astc_luts_wrap.cpp \
95 #-------------------------------------------------------------------------------
96 for src_pathname
in $libmesa_util_c_pathnames
98 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
99 printf "CPP $src_pathname --> $build_dir/src/util/$cpp_filename\n"
100 $cpp $src_pathname -o $build_dir/src
/util
/$cpp_filename \
101 -I$cc_internal_fixed_incdir \
102 -I$cc_internal_incdir \
106 -I$build_dir/src
/gallium
/auxiliary \
107 -I$src_dir/src
/gallium
/auxiliary \
108 -I$build_dir/src
/gallium
/include \
109 -I$src_dir/src
/gallium
/include \
110 -I$build_dir/src
/util
/format \
111 -I$src_dir/src
/util
/format \
112 -I$build_dir/src
/util \
113 -I$src_dir/src
/util \
114 -I$build_dir/src
/mesa \
115 -I$src_dir/src
/mesa \
118 -I$build_dir/include \
121 $syslib_cpp_flags_defs \
122 $linux_cpp_flags_defs \
123 $cc_builtins_cpp_flags_defs \
124 $cc_attributes_cpp_flags_defs \
125 $mesa_cpp_flags_defs \
127 $external_deps_cpp_flags &
129 #-------------------------------------------------------------------------------
131 #------------------------------------------------------------------------------
132 for src_pathname
in $libmesa_util_c_pathnames
134 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
135 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
136 printf "CC_S $build_dir/src/util/$cpp_filename --> $build_dir/src/util/$asm_filename\n"
137 $cc_s $build_dir/src
/util
/$cpp_filename -o $build_dir/src
/util
/$asm_filename &
139 #------------------------------------------------------------------------------
141 #------------------------------------------------------------------------------
143 for src_pathname
in $libmesa_util_c_pathnames
145 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
146 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
147 os
="$os $build_dir/src/util/$o_filename"
148 printf "AS $build_dir/src/util/$asm_filename --> $build_dir/src/util/$o_filename\n"
149 $as $build_dir/src
/util
/$asm_filename -o $build_dir/src
/util
/$o_filename &
151 #===============================================================================
152 for src_pathname
in $libmesa_util_cxx_pathnames
154 cxxpp_filename
=$
(basename $src_pathname .cpp
).cpp.cxx
155 printf "CXXPP $src_pathname --> $build_dir/src/util/$cxxpp_filename\n"
156 $cxxpp $src_pathname -o $build_dir/src
/util
/$cxxpp_filename \
157 -I$cc_internal_fixed_incdir \
158 -I$cc_internal_incdir \
159 -I$cxx_internal_incdir \
163 -I$build_dir/src
/gallium
/auxiliary \
164 -I$src_dir/src
/gallium
/auxiliary \
165 -I$build_dir/src
/gallium
/include \
166 -I$src_dir/src
/gallium
/include \
167 -I$build_dir/src
/util
/format \
168 -I$src_dir/src
/util
/format \
169 -I$build_dir/src
/util \
170 -I$src_dir/src
/util \
171 -I$build_dir/src
/mesa \
172 -I$src_dir/src
/mesa \
175 -I$build_dir/include \
178 $syslib_cpp_flags_defs \
179 $linux_cpp_flags_defs \
180 $cc_builtins_cpp_flags_defs \
181 $cc_attributes_cpp_flags_defs \
182 $mesa_cpp_flags_defs \
184 $external_deps_cpp_flags &
186 #------------------------------------------------------------------------------
188 #------------------------------------------------------------------------------
189 for src_pathname
in $libmesa_util_cxx_pathnames
191 cxxpp_filename
=$
(basename $src_pathname .cpp
).cpp.cxx
192 asm_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s
193 printf "CXX_S $build_dir/src/util/$cxxpp_filename --> $build_dir/src/util/$asm_filename\n"
194 $cxx_s $build_dir/src
/util
/$cxxpp_filename -o $build_dir/src
/util
/$asm_filename &
196 #------------------------------------------------------------------------------
198 #------------------------------------------------------------------------------
200 for src_pathname
in $libmesa_util_cxx_pathnames
202 asm_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s
203 o_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s.o
204 os
="$os $build_dir/src/util/$o_filename"
205 printf "AS $build_dir/src/util/$asm_filename --> $build_dir/src/util/$o_filename\n"
206 $as $build_dir/src
/util
/$asm_filename -o $build_dir/src
/util
/$o_filename &
208 #===============================================================================
209 # The following is for the ultra complex blake3 hash algorithm.
210 libmesautil_asm_pathnames
="\
211 $src_dir/src/util/blake3/blake3_sse2_x86-64_unix.S \
212 $src_dir/src/util/blake3/blake3_sse41_x86-64_unix.S \
213 $src_dir/src/util/blake3/blake3_avx2_x86-64_unix.S \
214 $src_dir/src/util/blake3/blake3_avx512_x86-64_unix.S \
216 #------------------------------------------------------------------------------
217 for src_pathname
in $libmesautil_asm_pathnames
219 asm_filename
=$
(basename $src_pathname .c
).cpp.s
221 printf "CPP $src_pathname --> $build_dir/src/util/blake3/$asm_filename\n"
222 $cpp $src_pathname -o $build_dir/src
/util
/blake
3/$asm_filename \
223 -I$cc_internal_fixed_incdir \
224 -I$cc_internal_incdir \
228 -I$build_dir/src
/gallium
/auxiliary \
229 -I$src_dir/src
/gallium
/auxiliary \
230 -I$build_dir/src
/gallium
/include \
231 -I$src_dir/src
/gallium
/include \
232 -I$build_dir/src
/util
/format \
233 -I$src_dir/src
/util
/format \
234 -I$build_dir/src
/util \
235 -I$src_dir/src
/util \
236 -I$build_dir/src
/mesa \
237 -I$src_dir/src
/mesa \
240 -I$build_dir/include \
243 $syslib_cpp_flags_defs \
244 $linux_cpp_flags_defs \
245 $cc_builtins_cpp_flags_defs \
246 $cc_attributes_cpp_flags_defs \
247 $mesa_cpp_flags_defs \
249 $external_deps_cpp_flags &
251 #-------------------------------------------------------------------------------
253 #-------------------------------------------------------------------------------
255 for src_pathname
in $libmesautil_asm_pathnames
257 asm_filename
=$
(basename $src_pathname .c
).cpp.s
258 o_filename
=$
(basename $src_pathname .c
).cpp.s.o
259 os
="$os $build_dir/src/util/blake3/$o_filename"
261 printf "AS $build_dir/src/util/blake3/$asm_filename --> $build_dir/src/util/blake3/$o_filename\n"
262 $as $build_dir/src
/util
/blake
3/$asm_filename -o $build_dir/src
/util
/blake
3/$o_filename &
264 #-------------------------------------------------------------------------------
266 #-------------------------------------------------------------------------------
267 printf "AR RCS $build_dir/libmesa_util.a $os\n"
268 $ar_rcs $build_dir/libmesa_util.a
$os
269 #===============================================================================
270 printf "CPP $src_dir/src/util/xmlconfig.c --> $build_dir/src/util/xmlconfig.cpp.c\n"
271 $cpp $src_dir/src
/util
/xmlconfig.c
-o $build_dir/src
/util
/xmlconfig.cpp.c \
272 -DSYSCONFDIR=\"$sysconfdir\" \
273 -DDATADIR=\"$datadir_runtime\" \
275 -I$cc_internal_fixed_incdir \
276 -I$cc_internal_incdir \
280 -I$build_dir/src
/util
/blake3 \
281 -I$src_dir/src
/util
/blake3 \
282 -I$build_dir/src
/util \
283 -I$src_dir/src
/util \
286 -I$build_dir/include \
289 $syslib_cpp_flags_defs \
290 $linux_cpp_flags_defs \
291 $cc_builtins_cpp_flags_defs \
292 $cc_attributes_cpp_flags_defs \
293 $mesa_cpp_flags_defs \
295 $external_deps_cpp_flags
296 #-------------------------------------------------------------------------------
297 printf "CC_S $build_dir/src/util/xmlconfig.cpp.c --> $build_dir/src/util/xmlconfig.cpp.c.s\n"
298 $cc_s $build_dir/src
/util
/xmlconfig.cpp.c
-o $build_dir/src
/util
/xmlconfig.cpp.c.s
299 #-------------------------------------------------------------------------------
300 printf "AS $build_dir/src/util/xmlconfig.cpp.c.s --> $build_dir/src/util/xmlconfig.cpp.c.s.o\n"
301 $as $build_dir/src
/util
/xmlconfig.cpp.c.s
-o $build_dir/src
/util
/xmlconfig.cpp.c.s.o
302 #-------------------------------------------------------------------------------
303 printf "AR RCS $build_dir/libxmlconfig.a $build_dir/src/util/xmlconfig.cpp.c.s.o\n"
304 $ar_rcs $build_dir/libxmlconfig.a
$build_dir/src
/util
/xmlconfig.cpp.c.s.o
&
305 #===============================================================================
307 $build_dir/install_root
$datadir_runtime/drirc.d \
308 $build_dir/install_root
$datadir_store/drirc.d
309 cp -f $src_dir/src
/util
/00-mesa-defaults.conf
$build_dir/install_root
$datadir_store/drirc.d
310 ln -sTf $datadir_store_virtual/drirc.d
/00-mesa-defaults.conf
$build_dir/install_root
$datadir_runtime/drirc.d
/00-mesa-defaults.conf
311 #===============================================================================
312 echo "<-- util built"