mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-87417012f3f42b84b6e8f8264f64e0388201f55b / contrib / util.sh
blob770538248ea3c121eac2ef81ff9c26e4ddf2d154
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/u_process.c \
34 $src_dir/src/util/sha1/sha1.c \
35 $src_dir/src/util/ralloc.c \
36 $src_dir/src/util/rand_xor.c \
37 $src_dir/src/util/rb_tree.c \
38 $src_dir/src/util/register_allocate.c \
39 $src_dir/src/util/rgtc.c \
40 $src_dir/src/util/rwlock.c \
41 $src_dir/src/util/set.c \
42 $src_dir/src/util/simple_mtx.c \
43 $src_dir/src/util/slab.c \
44 $src_dir/src/util/softfloat.c \
45 $src_dir/src/util/sparse_array.c \
46 $src_dir/src/util/streaming-load-memcpy.c \
47 $src_dir/src/util/string_buffer.c \
48 $src_dir/src/util/strtod.c \
49 $src_dir/src/util/u_atomic.c \
50 $src_dir/src/util/u_dl.c \
51 $src_dir/src/util/u_debug_memory.c \
52 $src_dir/src/util/u_dynarray.c \
53 $src_dir/src/util/u_printf.c \
54 $src_dir/src/util/format/u_format.c \
55 $src_dir/src/util/format/u_format_bptc.c \
56 $src_dir/src/util/format/u_format_etc.c \
57 $src_dir/src/util/format/u_format_fxt1.c \
58 $src_dir/src/util/format/u_format_latc.c \
59 $src_dir/src/util/format/u_format_other.c \
60 $src_dir/src/util/format/u_format_rgtc.c \
61 $src_dir/src/util/format/u_format_s3tc.c \
62 $src_dir/src/util/format/u_format_tests.c \
63 $src_dir/src/util/format/u_format_yuv.c \
64 $src_dir/src/util/format/u_format_zs.c \
65 $src_dir/src/util/u_cpu_detect.c \
66 $src_dir/src/util/u_call_once.c \
67 $src_dir/src/util/u_debug.c \
68 $src_dir/src/util/u_debug_stack.c \
69 $src_dir/src/util/u_debug_symbol.c \
70 $src_dir/src/util/u_hash_table.c \
71 $src_dir/src/util/u_idalloc.c \
72 $src_dir/src/util/u_math.c \
73 $src_dir/src/util/u_mm.c \
74 $src_dir/src/util/u_queue.c \
75 $src_dir/src/util/u_thread.c \
76 $build_dir/src/util/perf/u_trace.c \
77 $src_dir/src/util/u_vector.c \
78 $src_dir/src/util/u_worklist.c \
79 $src_dir/src/util/vma.c \
81 $src_dir/src/c11/impl/threads_posix.c \
82 $src_dir/src/c11/impl/time.c \
84 # from the trashiest and toxiciest coders:
85 libmesa_util_cxx_pathnames="\
86 $src_dir/src/util/texcompress_astc_luts.cpp \
87 $src_dir/src/util/texcompress_astc_luts_wrap.cpp \
89 #-------------------------------------------------------------------------------
90 for src_pathname in $libmesa_util_c_pathnames
92 cpp_filename=$(basename $src_pathname .c).cpp.c
93 printf "CPP $src_pathname --> $build_dir/src/util/$cpp_filename\n"
94 $cpp $src_pathname -o $build_dir/src/util/$cpp_filename \
95 -I$cc_internal_fixed_incdir \
96 -I$cc_internal_incdir \
97 -I$linux_incdir \
98 -I$syslib_incdir \
100 -I$build_dir/src/gallium/auxiliary \
101 -I$src_dir/src/gallium/auxiliary \
102 -I$build_dir/src/gallium/include \
103 -I$src_dir/src/gallium/include \
104 -I$build_dir/src/util/format \
105 -I$src_dir/src/util/format \
106 -I$build_dir/src/util \
107 -I$src_dir/src/util \
108 -I$build_dir/src/mesa \
109 -I$src_dir/src/mesa \
110 -I$build_dir/src \
111 -I$src_dir/src \
112 -I$build_dir/include \
113 -I$src_dir/include \
115 $syslib_cpp_flags_defs \
116 $linux_cpp_flags_defs \
117 $cc_builtins_cpp_flags_defs \
118 $cc_attributes_cpp_flags_defs \
119 $mesa_cpp_flags_defs \
121 $external_deps_cpp_flags &
122 done
123 #-------------------------------------------------------------------------------
124 wait
125 #------------------------------------------------------------------------------
126 for src_pathname in $libmesa_util_c_pathnames
128 cpp_filename=$(basename $src_pathname .c).cpp.c
129 asm_filename=$(basename $src_pathname .c).cpp.c.s
130 printf "CC_S $build_dir/src/util/$cpp_filename --> $build_dir/src/util/$asm_filename\n"
131 $cc_s $build_dir/src/util/$cpp_filename -o $build_dir/src/util/$asm_filename &
132 done
133 #------------------------------------------------------------------------------
134 wait
135 #------------------------------------------------------------------------------
137 for src_pathname in $libmesa_util_c_pathnames
139 asm_filename=$(basename $src_pathname .c).cpp.c.s
140 o_filename=$(basename $src_pathname .c).cpp.c.s.o
141 os="$os $build_dir/src/util/$o_filename"
142 printf "AS $build_dir/src/util/$asm_filename --> $build_dir/src/util/$o_filename\n"
143 $as $build_dir/src/util/$asm_filename -o $build_dir/src/util/$o_filename &
144 done
145 #===============================================================================
146 for src_pathname in $libmesa_util_cxx_pathnames
148 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
149 printf "CXXPP $src_pathname --> $build_dir/src/util/$cxxpp_filename\n"
150 $cxxpp $src_pathname -o $build_dir/src/util/$cxxpp_filename \
151 -I$cc_internal_fixed_incdir \
152 -I$cc_internal_incdir \
153 -I$cxx_internal_incdir \
154 -I$linux_incdir \
155 -I$syslib_incdir \
157 -I$build_dir/src/gallium/auxiliary \
158 -I$src_dir/src/gallium/auxiliary \
159 -I$build_dir/src/gallium/include \
160 -I$src_dir/src/gallium/include \
161 -I$build_dir/src/util/format \
162 -I$src_dir/src/util/format \
163 -I$build_dir/src/util \
164 -I$src_dir/src/util \
165 -I$build_dir/src/mesa \
166 -I$src_dir/src/mesa \
167 -I$build_dir/src \
168 -I$src_dir/src \
169 -I$build_dir/include \
170 -I$src_dir/include \
172 $syslib_cpp_flags_defs \
173 $linux_cpp_flags_defs \
174 $cc_builtins_cpp_flags_defs \
175 $cc_attributes_cpp_flags_defs \
176 $mesa_cpp_flags_defs \
178 $external_deps_cpp_flags &
179 done
180 #------------------------------------------------------------------------------
181 wait
182 #------------------------------------------------------------------------------
183 for src_pathname in $libmesa_util_cxx_pathnames
185 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
186 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
187 printf "CXX_S $build_dir/src/util/$cxxpp_filename --> $build_dir/src/util/$asm_filename\n"
188 $cxx_s $build_dir/src/util/$cxxpp_filename -o $build_dir/src/util/$asm_filename &
189 done
190 #------------------------------------------------------------------------------
191 wait
192 #------------------------------------------------------------------------------
193 # reuse os
194 for src_pathname in $libmesa_util_cxx_pathnames
196 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
197 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
198 os="$os $build_dir/src/util/$o_filename"
199 printf "AS $build_dir/src/util/$asm_filename --> $build_dir/src/util/$o_filename\n"
200 $as $build_dir/src/util/$asm_filename -o $build_dir/src/util/$o_filename &
201 done
202 #-------------------------------------------------------------------------------
203 wait
204 #-------------------------------------------------------------------------------
205 printf "AR RCS $build_dir/libmesa_util.a $os\n"
206 $ar_rcs $build_dir/libmesa_util.a $os
207 #===============================================================================
208 printf "CPP $src_dir/src/util/xmlconfig.c --> $build_dir/src/util/xmlconfig.cpp.c\n"
209 $cpp $src_dir/src/util/xmlconfig.c -o $build_dir/src/util/xmlconfig.cpp.c \
210 -DSYSCONFDIR=\"$sysconfdir\" \
211 -DDATADIR=\"$datadir_runtime\" \
213 -I$cc_internal_fixed_incdir \
214 -I$cc_internal_incdir \
215 -I$linux_incdir \
216 -I$syslib_incdir \
218 -I$build_dir/src/util \
219 -I$src_dir/src/util \
220 -I$build_dir/src \
221 -I$src_dir/src \
222 -I$build_dir/include \
223 -I$src_dir/include \
225 $syslib_cpp_flags_defs \
226 $linux_cpp_flags_defs \
227 $cc_builtins_cpp_flags_defs \
228 $cc_attributes_cpp_flags_defs \
229 $mesa_cpp_flags_defs \
231 $external_deps_cpp_flags
232 #-------------------------------------------------------------------------------
233 printf "CC_S $build_dir/src/util/xmlconfig.cpp.c --> $build_dir/src/util/xmlconfig.cpp.c.s\n"
234 $cc_s $build_dir/src/util/xmlconfig.cpp.c -o $build_dir/src/util/xmlconfig.cpp.c.s
235 #-------------------------------------------------------------------------------
236 printf "AS $build_dir/src/util/xmlconfig.cpp.c.s --> $build_dir/src/util/xmlconfig.cpp.c.s.o\n"
237 $as $build_dir/src/util/xmlconfig.cpp.c.s -o $build_dir/src/util/xmlconfig.cpp.c.s.o
238 #-------------------------------------------------------------------------------
239 printf "AR RCS $build_dir/libxmlconfig.a $build_dir/src/util/xmlconfig.cpp.c.s.o\n"
240 $ar_rcs $build_dir/libxmlconfig.a $build_dir/src/util/xmlconfig.cpp.c.s.o &
241 #===============================================================================
242 mkdir -p \
243 $build_dir/install_root$datadir_runtime/drirc.d \
244 $build_dir/install_root$datadir_store/drirc.d
245 cp -f $src_dir/src/util/00-mesa-defaults.conf $build_dir/install_root$datadir_store/drirc.d
246 ln -sTf $datadir_store_virtual/drirc.d/00-mesa-defaults.conf $build_dir/install_root$datadir_runtime/drirc.d/00-mesa-defaults.conf
247 #===============================================================================
248 echo "<-- util built"