mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-7bd1d4848cf755257644e9b79289a364db659026 / contrib / util.sh
blobda3121da5accad73e1da1cd38009ff120e16f696
1 echo "building util -->"
2 #===============================================================================
3 mkdir -p $build_dir/src/util
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/blob.c \
12 $src_dir/src/util/build_id.c \
13 $src_dir/src/util/compress.c \
14 $src_dir/src/util/crc32.c \
15 $src_dir/src/util/disk_cache.c \
16 $src_dir/src/util/disk_cache_os.c \
17 $src_dir/src/util/double.c \
18 $src_dir/src/util/fast_idiv_by_const.c \
19 $src_dir/src/util/fossilize_db.c \
20 $src_dir/src/util/futex.c \
21 $src_dir/src/util/half_float.c \
22 $src_dir/src/util/hash_table.c \
23 $src_dir/src/util/log.c \
24 $src_dir/src/util/mesa-sha1.c \
25 $build_dir/src/util/mesa_cache_db.c \
26 $src_dir/src/util/mesa_cache_db_multipart.c \
27 $src_dir/src/util/memstream.c \
28 $src_dir/src/util/os_file.c \
29 $src_dir/src/util/os_time.c \
30 $src_dir/src/util/os_memory_fd.c \
31 $src_dir/src/util/os_misc.c \
32 $src_dir/src/util/os_socket.c \
33 $src_dir/src/util/parson.c \
34 $src_dir/src/util/u_process.c \
35 $src_dir/src/util/sha1/sha1.c \
36 $src_dir/src/util/ralloc.c \
37 $src_dir/src/util/rand_xor.c \
38 $src_dir/src/util/rb_tree.c \
39 $src_dir/src/util/register_allocate.c \
40 $src_dir/src/util/rgtc.c \
41 $src_dir/src/util/rwlock.c \
42 $src_dir/src/util/set.c \
43 $src_dir/src/util/simple_mtx.c \
44 $src_dir/src/util/slab.c \
45 $src_dir/src/util/softfloat.c \
46 $src_dir/src/util/sparse_array.c \
47 $src_dir/src/util/streaming-load-memcpy.c \
48 $src_dir/src/util/string_buffer.c \
49 $src_dir/src/util/strtod.c \
50 $src_dir/src/util/thread_sched.c \
51 $src_dir/src/util/u_atomic.c \
52 $src_dir/src/util/u_dl.c \
53 $src_dir/src/util/u_debug_memory.c \
54 $src_dir/src/util/u_dynarray.c \
55 $src_dir/src/util/u_printf.c \
56 $src_dir/src/util/format/u_format.c \
57 $src_dir/src/util/format/u_format_bptc.c \
58 $src_dir/src/util/format/u_format_etc.c \
59 $src_dir/src/util/format/u_format_fxt1.c \
60 $src_dir/src/util/format/u_format_latc.c \
61 $src_dir/src/util/format/u_format_other.c \
62 $src_dir/src/util/format/u_format_rgtc.c \
63 $src_dir/src/util/format/u_format_s3tc.c \
64 $src_dir/src/util/format/u_format_tests.c \
65 $src_dir/src/util/format/u_format_yuv.c \
66 $src_dir/src/util/format/u_format_zs.c \
67 $src_dir/src/util/u_cpu_detect.c \
68 $src_dir/src/util/u_call_once.c \
69 $src_dir/src/util/u_debug.c \
70 $src_dir/src/util/u_debug_stack.c \
71 $src_dir/src/util/u_debug_symbol.c \
72 $src_dir/src/util/u_hash_table.c \
73 $src_dir/src/util/u_idalloc.c \
74 $src_dir/src/util/u_math.c \
75 $src_dir/src/util/u_mm.c \
76 $src_dir/src/util/u_queue.c \
77 $src_dir/src/util/u_thread.c \
78 $build_dir/src/util/perf/u_trace.c \
79 $src_dir/src/util/u_vector.c \
80 $src_dir/src/util/u_worklist.c \
81 $src_dir/src/util/vma.c \
83 $src_dir/src/c11/impl/threads_posix.c \
84 $src_dir/src/c11/impl/time.c \
86 # from the trashiest and toxiciest coders:
87 libmesa_util_cxx_pathnames="\
88 $src_dir/src/util/texcompress_astc_luts.cpp \
89 $src_dir/src/util/texcompress_astc_luts_wrap.cpp \
91 #-------------------------------------------------------------------------------
92 for src_pathname in $libmesa_util_c_pathnames
94 cpp_filename=$(basename $src_pathname .c).cpp.c
95 printf "CPP $src_pathname --> $build_dir/src/util/$cpp_filename\n"
96 $cpp $src_pathname -o $build_dir/src/util/$cpp_filename \
97 -I$cc_internal_fixed_incdir \
98 -I$cc_internal_incdir \
99 -I$linux_incdir \
100 -I$syslib_incdir \
102 -I$build_dir/src/gallium/auxiliary \
103 -I$src_dir/src/gallium/auxiliary \
104 -I$build_dir/src/gallium/include \
105 -I$src_dir/src/gallium/include \
106 -I$build_dir/src/util/format \
107 -I$src_dir/src/util/format \
108 -I$build_dir/src/util \
109 -I$src_dir/src/util \
110 -I$build_dir/src/mesa \
111 -I$src_dir/src/mesa \
112 -I$build_dir/src \
113 -I$src_dir/src \
114 -I$build_dir/include \
115 -I$src_dir/include \
117 $syslib_cpp_flags_defs \
118 $linux_cpp_flags_defs \
119 $cc_builtins_cpp_flags_defs \
120 $cc_attributes_cpp_flags_defs \
121 $mesa_cpp_flags_defs \
123 $external_deps_cpp_flags &
124 done
125 #-------------------------------------------------------------------------------
126 wait
127 #------------------------------------------------------------------------------
128 for src_pathname in $libmesa_util_c_pathnames
130 cpp_filename=$(basename $src_pathname .c).cpp.c
131 asm_filename=$(basename $src_pathname .c).cpp.c.s
132 printf "CC_S $build_dir/src/util/$cpp_filename --> $build_dir/src/util/$asm_filename\n"
133 $cc_s $build_dir/src/util/$cpp_filename -o $build_dir/src/util/$asm_filename &
134 done
135 #------------------------------------------------------------------------------
136 wait
137 #------------------------------------------------------------------------------
139 for src_pathname in $libmesa_util_c_pathnames
141 asm_filename=$(basename $src_pathname .c).cpp.c.s
142 o_filename=$(basename $src_pathname .c).cpp.c.s.o
143 os="$os $build_dir/src/util/$o_filename"
144 printf "AS $build_dir/src/util/$asm_filename --> $build_dir/src/util/$o_filename\n"
145 $as $build_dir/src/util/$asm_filename -o $build_dir/src/util/$o_filename &
146 done
147 #===============================================================================
148 for src_pathname in $libmesa_util_cxx_pathnames
150 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
151 printf "CXXPP $src_pathname --> $build_dir/src/util/$cxxpp_filename\n"
152 $cxxpp $src_pathname -o $build_dir/src/util/$cxxpp_filename \
153 -I$cc_internal_fixed_incdir \
154 -I$cc_internal_incdir \
155 -I$cxx_internal_incdir \
156 -I$linux_incdir \
157 -I$syslib_incdir \
159 -I$build_dir/src/gallium/auxiliary \
160 -I$src_dir/src/gallium/auxiliary \
161 -I$build_dir/src/gallium/include \
162 -I$src_dir/src/gallium/include \
163 -I$build_dir/src/util/format \
164 -I$src_dir/src/util/format \
165 -I$build_dir/src/util \
166 -I$src_dir/src/util \
167 -I$build_dir/src/mesa \
168 -I$src_dir/src/mesa \
169 -I$build_dir/src \
170 -I$src_dir/src \
171 -I$build_dir/include \
172 -I$src_dir/include \
174 $syslib_cpp_flags_defs \
175 $linux_cpp_flags_defs \
176 $cc_builtins_cpp_flags_defs \
177 $cc_attributes_cpp_flags_defs \
178 $mesa_cpp_flags_defs \
180 $external_deps_cpp_flags &
181 done
182 #------------------------------------------------------------------------------
183 wait
184 #------------------------------------------------------------------------------
185 for src_pathname in $libmesa_util_cxx_pathnames
187 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
188 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
189 printf "CXX_S $build_dir/src/util/$cxxpp_filename --> $build_dir/src/util/$asm_filename\n"
190 $cxx_s $build_dir/src/util/$cxxpp_filename -o $build_dir/src/util/$asm_filename &
191 done
192 #------------------------------------------------------------------------------
193 wait
194 #------------------------------------------------------------------------------
195 # reuse os
196 for src_pathname in $libmesa_util_cxx_pathnames
198 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
199 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
200 os="$os $build_dir/src/util/$o_filename"
201 printf "AS $build_dir/src/util/$asm_filename --> $build_dir/src/util/$o_filename\n"
202 $as $build_dir/src/util/$asm_filename -o $build_dir/src/util/$o_filename &
203 done
204 #-------------------------------------------------------------------------------
205 wait
206 #-------------------------------------------------------------------------------
207 printf "AR RCS $build_dir/libmesa_util.a $os\n"
208 $ar_rcs $build_dir/libmesa_util.a $os
209 #===============================================================================
210 printf "CPP $src_dir/src/util/xmlconfig.c --> $build_dir/src/util/xmlconfig.cpp.c\n"
211 $cpp $src_dir/src/util/xmlconfig.c -o $build_dir/src/util/xmlconfig.cpp.c \
212 -DSYSCONFDIR=\"$sysconfdir\" \
213 -DDATADIR=\"$datadir_runtime\" \
215 -I$cc_internal_fixed_incdir \
216 -I$cc_internal_incdir \
217 -I$linux_incdir \
218 -I$syslib_incdir \
220 -I$build_dir/src/util \
221 -I$src_dir/src/util \
222 -I$build_dir/src \
223 -I$src_dir/src \
224 -I$build_dir/include \
225 -I$src_dir/include \
227 $syslib_cpp_flags_defs \
228 $linux_cpp_flags_defs \
229 $cc_builtins_cpp_flags_defs \
230 $cc_attributes_cpp_flags_defs \
231 $mesa_cpp_flags_defs \
233 $external_deps_cpp_flags
234 #-------------------------------------------------------------------------------
235 printf "CC_S $build_dir/src/util/xmlconfig.cpp.c --> $build_dir/src/util/xmlconfig.cpp.c.s\n"
236 $cc_s $build_dir/src/util/xmlconfig.cpp.c -o $build_dir/src/util/xmlconfig.cpp.c.s
237 #-------------------------------------------------------------------------------
238 printf "AS $build_dir/src/util/xmlconfig.cpp.c.s --> $build_dir/src/util/xmlconfig.cpp.c.s.o\n"
239 $as $build_dir/src/util/xmlconfig.cpp.c.s -o $build_dir/src/util/xmlconfig.cpp.c.s.o
240 #-------------------------------------------------------------------------------
241 printf "AR RCS $build_dir/libxmlconfig.a $build_dir/src/util/xmlconfig.cpp.c.s.o\n"
242 $ar_rcs $build_dir/libxmlconfig.a $build_dir/src/util/xmlconfig.cpp.c.s.o &
243 #===============================================================================
244 mkdir -p \
245 $build_dir/install_root$datadir_runtime/drirc.d \
246 $build_dir/install_root$datadir_store/drirc.d
247 cp -f $src_dir/src/util/00-mesa-defaults.conf $build_dir/install_root$datadir_store/drirc.d
248 ln -sTf $datadir_store_virtual/drirc.d/00-mesa-defaults.conf $build_dir/install_root$datadir_runtime/drirc.d/00-mesa-defaults.conf
249 #===============================================================================
250 echo "<-- util built"