mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-fe36cf6cad9b226dff993a8f1f8f0bf451f095c5 / contrib / compiler_glsl.sh
blob9dae218c967072b7c92a5a2031f575be56ead31c
1 printf "\tbuilding glsl compiler sub-components-->\n"
2 #===============================================================================
3 mkdir -p $build_dir/src/compiler/glsl/glcpp
4 #-------------------------------------------------------------------------------
5 libglcpp_c_pathnames="\
6 $src_dir/src/compiler/glsl/glcpp/pp.c \
7 $src_dir/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c \
8 $build_dir/src/compiler/glsl/glcpp/glcpp-lex.c \
9 $build_dir/src/compiler/glsl/glcpp/glcpp-parse.c \
11 #-------------------------------------------------------------------------------
12 for src_pathname in $libglcpp_c_pathnames
14 cpp_filename=$(basename $src_pathname .c).cpp.c
15 printf "CPP $src_pathname --> $build_dir/src/compiler/glsl/glcpp/$cpp_filename\n"
16 $cpp $src_pathname -o $build_dir/src/compiler/glsl/glcpp/$cpp_filename \
17 -I$cc_internal_fixed_incdir \
18 -I$cc_internal_incdir \
19 -I$linux_incdir \
20 -I$syslib_incdir \
22 -I$build_dir/src/compiler/glsl/glcpp \
23 -I$src_dir/src/compiler/glsl/glcpp \
24 -I$build_dir/src/compiler/glsl \
25 -I$src_dir/src/compiler/glsl \
26 -I$build_dir/src/compiler/nir \
27 -I$src_dir/src/compiler/nir \
28 -I$build_dir/src/compiler \
29 -I$src_dir/src/compiler \
30 -I$build_dir/src/gallium/include \
31 -I$src_dir/src/gallium/include \
32 -I$build_dir/src/mapi \
33 -I$src_dir/src/mapi \
34 -I$build_dir/src/main \
35 -I$src_dir/src/main \
36 -I$build_dir/src/mesa \
37 -I$src_dir/src/mesa \
38 -I$build_dir/src \
39 -I$src_dir/src \
40 -I$build_dir/include \
41 -I$src_dir/include \
43 $syslib_cpp_flags_defs \
44 $linux_cpp_flags_defs \
45 $cc_builtins_cpp_flags_defs \
46 $cc_attributes_cpp_flags_defs \
47 $mesa_cpp_flags_defs \
49 $external_deps_cpp_flags &
50 done
51 #-------------------------------------------------------------------------------
52 wait
53 #------------------------------------------------------------------------------
54 for src_pathname in $libglcpp_c_pathnames
56 cpp_filename=$(basename $src_pathname .c).cpp.c
57 asm_filename=$(basename $src_pathname .c).cpp.c.s
58 printf "CC_S $build_dir/src/compiler/glsl/glcpp/$cpp_filename --> $build_dir/src/compiler/glsl/glcpp$asm_filename\n"
59 $cc_s $build_dir/src/compiler/glsl/glcpp/$cpp_filename -o $build_dir/src/compiler/glsl/glcpp/$asm_filename &
60 done
61 #------------------------------------------------------------------------------
62 wait
63 #------------------------------------------------------------------------------
64 os=
65 for src_pathname in $libglcpp_c_pathnames
67 asm_filename=$(basename $src_pathname .c).cpp.c.s
68 o_filename=$(basename $src_pathname .c).cpp.c.s.o
69 os="$os $build_dir/src/compiler/glsl/glcpp/$o_filename"
70 printf "AS $build_dir/src/compiler/glsl/glcpp/$asm_filename --> $build_dir/src/compiler/glsl/glcpp/$o_filename\n"
71 $as $build_dir/src/compiler/glsl/glcpp/$asm_filename -o $build_dir/src/compiler/glsl/glcpp/$o_filename &
72 done
73 #------------------------------------------------------------------------------
74 wait
75 #------------------------------------------------------------------------------
76 printf "AR RCS $build_dir/libglcpp.a $os\n"
77 $ar_rcs $build_dir/libglcpp.a $os &
78 #===============================================================================
79 libglsl_c_pathnames="\
80 $src_dir/src/compiler/glsl/gl_nir_detect_function_recursion.c \
81 $src_dir/src/compiler/glsl/gl_nir_lower_atomics.c \
82 $src_dir/src/compiler/glsl/gl_nir_lower_blend_equation_advanced.c \
83 $src_dir/src/compiler/glsl/gl_nir_lower_discard_flow.c \
84 $src_dir/src/compiler/glsl/gl_nir_lower_images.c \
85 $src_dir/src/compiler/glsl/gl_nir_lower_buffers.c \
86 $src_dir/src/compiler/glsl/gl_nir_lower_named_interface_blocks.c \
87 $src_dir/src/compiler/glsl/gl_nir_lower_samplers.c \
88 $src_dir/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c \
89 $src_dir/src/compiler/glsl/gl_nir_link_atomics.c \
90 $src_dir/src/compiler/glsl/gl_nir_link_interface_blocks.c \
91 $src_dir/src/compiler/glsl/gl_nir_link_uniform_initializers.c \
92 $src_dir/src/compiler/glsl/gl_nir_link_uniform_blocks.c \
93 $src_dir/src/compiler/glsl/gl_nir_link_uniforms.c \
94 $src_dir/src/compiler/glsl/gl_nir_link_varyings.c \
95 $src_dir/src/compiler/glsl/gl_nir_link_xfb.c \
96 $src_dir/src/compiler/glsl/gl_nir_linker.c \
97 $src_dir/src/compiler/glsl/gl_nir_lower_packed_varyings.c \
98 $src_dir/src/compiler/glsl/gl_nir_lower_xfb_varying.c \
99 $src_dir/src/compiler/glsl/gl_nir_opt_dead_builtin_varyings.c \
101 # There are still trash thinking coding c++ make them smart instead of filthy
102 # toxic.
103 libglsl_cxx_pathnames="\
104 $build_dir/src/compiler/glsl/glsl_parser.cpp \
105 $build_dir/src/compiler/glsl/glsl_lexer.cpp \
106 $src_dir/src/compiler/glsl/ast_array_index.cpp \
107 $src_dir/src/compiler/glsl/ast_expr.cpp \
108 $src_dir/src/compiler/glsl/ast_function.cpp \
109 $src_dir/src/compiler/glsl/ast_to_hir.cpp \
110 $src_dir/src/compiler/glsl/ast_type.cpp \
111 $src_dir/src/compiler/glsl/builtin_functions.cpp \
112 $src_dir/src/compiler/glsl/builtin_types.cpp \
113 $src_dir/src/compiler/glsl/builtin_variables.cpp \
114 $src_dir/src/compiler/glsl/glsl_parser_extras.cpp \
115 $src_dir/src/compiler/glsl/glsl_symbol_table.cpp \
116 $src_dir/src/compiler/glsl/glsl_to_nir.cpp \
117 $src_dir/src/compiler/glsl/hir_field_selection.cpp \
118 $src_dir/src/compiler/glsl/ir_array_refcount.cpp \
119 $src_dir/src/compiler/glsl/ir_basic_block.cpp \
120 $src_dir/src/compiler/glsl/ir_builder.cpp \
121 $src_dir/src/compiler/glsl/ir_clone.cpp \
122 $src_dir/src/compiler/glsl/ir_constant_expression.cpp \
123 $src_dir/src/compiler/glsl/ir.cpp \
124 $src_dir/src/compiler/glsl/ir_equals.cpp \
125 $src_dir/src/compiler/glsl/ir_expression_flattening.cpp \
126 $src_dir/src/compiler/glsl/ir_function_can_inline.cpp \
127 $src_dir/src/compiler/glsl/ir_function_detect_recursion.cpp \
128 $src_dir/src/compiler/glsl/ir_function.cpp \
129 $src_dir/src/compiler/glsl/ir_hierarchical_visitor.cpp \
130 $src_dir/src/compiler/glsl/ir_hv_accept.cpp \
131 $src_dir/src/compiler/glsl/ir_print_visitor.cpp \
132 $src_dir/src/compiler/glsl/ir_reader.cpp \
133 $src_dir/src/compiler/glsl/ir_rvalue_visitor.cpp \
134 $src_dir/src/compiler/glsl/ir_validate.cpp \
135 $src_dir/src/compiler/glsl/ir_variable_refcount.cpp \
136 $src_dir/src/compiler/glsl/linker.cpp \
137 $src_dir/src/compiler/glsl/linker_util.cpp \
138 $src_dir/src/compiler/glsl/link_functions.cpp \
139 $src_dir/src/compiler/glsl/link_interface_blocks.cpp \
140 $src_dir/src/compiler/glsl/lower_builtins.cpp \
141 $src_dir/src/compiler/glsl/lower_instructions.cpp \
142 $src_dir/src/compiler/glsl/lower_jumps.cpp \
143 $src_dir/src/compiler/glsl/lower_mat_op_to_vec.cpp \
144 $src_dir/src/compiler/glsl/lower_precision.cpp \
145 $src_dir/src/compiler/glsl/lower_packing_builtins.cpp \
146 $src_dir/src/compiler/glsl/lower_subroutine.cpp \
147 $src_dir/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp \
148 $src_dir/src/compiler/glsl/lower_vector_derefs.cpp \
149 $src_dir/src/compiler/glsl/opt_algebraic.cpp \
150 $src_dir/src/compiler/glsl/opt_dead_builtin_variables.cpp \
151 $src_dir/src/compiler/glsl/opt_dead_code.cpp \
152 $src_dir/src/compiler/glsl/opt_dead_code_local.cpp \
153 $src_dir/src/compiler/glsl/opt_dead_functions.cpp \
154 $src_dir/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp \
155 $src_dir/src/compiler/glsl/opt_flip_matrices.cpp \
156 $src_dir/src/compiler/glsl/opt_function_inlining.cpp \
157 $src_dir/src/compiler/glsl/opt_if_simplification.cpp \
158 $src_dir/src/compiler/glsl/opt_minmax.cpp \
159 $src_dir/src/compiler/glsl/opt_rebalance_tree.cpp \
160 $src_dir/src/compiler/glsl/opt_tree_grafting.cpp \
161 $src_dir/src/compiler/glsl/propagate_invariance.cpp \
162 $src_dir/src/compiler/glsl/s_expression.cpp \
163 $src_dir/src/compiler/glsl/string_to_uint_map.cpp \
164 $src_dir/src/compiler/glsl/serialize.cpp \
165 $src_dir/src/compiler/glsl/shader_cache.cpp \
167 #-------------------------------------------------------------------------------
168 for src_pathname in $libglsl_c_pathnames
170 cpp_filename=$(basename $src_pathname .c).cpp.c
171 printf "CPP $src_pathname --> $build_dir/src/compiler/glsl/$cpp_filename\n"
172 $cpp $src_pathname -o $build_dir/src/compiler/glsl/$cpp_filename \
173 -I$cc_internal_fixed_incdir \
174 -I$cc_internal_incdir \
175 -I$linux_incdir \
176 -I$syslib_incdir \
178 -I$build_dir/src/compiler/glsl \
179 -I$src_dir/src/compiler/glsl \
180 -I$build_dir/src/compiler/nir \
181 -I$src_dir/src/compiler/nir \
182 -I$build_dir/src/compiler \
183 -I$src_dir/src/compiler \
184 -I$build_dir/src/gallium/include \
185 -I$src_dir/src/gallium/include \
186 -I$build_dir/src/mapi \
187 -I$src_dir/src/mapi \
188 -I$build_dir/src/mesa \
189 -I$src_dir/src/mesa \
190 -I$build_dir/src \
191 -I$src_dir/src \
192 -I$build_dir/include \
193 -I$src_dir/include \
195 $syslib_cpp_flags_defs \
196 $linux_cpp_flags_defs \
197 $cc_builtins_cpp_flags_defs \
198 $cc_attributes_cpp_flags_defs \
199 $mesa_cpp_flags_defs \
201 $external_deps_cpp_flags &
202 done
203 #-------------------------------------------------------------------------------
204 wait
205 #------------------------------------------------------------------------------
206 for src_pathname in $libglsl_c_pathnames
208 cpp_filename=$(basename $src_pathname .c).cpp.c
209 asm_filename=$(basename $src_pathname .c).cpp.c.s
210 printf "CC_S $build_dir/src/compiler/glsl/$cpp_filename --> $build_dir/src/compiler/glsl/$asm_filename\n"
211 $cc_s $build_dir/src/compiler/glsl/$cpp_filename -o $build_dir/src/compiler/glsl/$asm_filename &
212 done
213 #------------------------------------------------------------------------------
214 wait
215 #------------------------------------------------------------------------------
217 for src_pathname in $libglsl_c_pathnames
219 asm_filename=$(basename $src_pathname .c).cpp.c.s
220 o_filename=$(basename $src_pathname .c).cpp.c.s.o
221 os="$os $build_dir/src/compiler/glsl/$o_filename"
222 printf "AS $build_dir/src/compiler/glsl/$asm_filename --> $build_dir/src/compiler/glsl/$o_filename\n"
223 $as $build_dir/src/compiler/glsl/$asm_filename -o $build_dir/src/compiler/glsl/$o_filename &
224 done
225 #===============================================================================
226 for src_pathname in $libglsl_cxx_pathnames
228 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
229 printf "CXXPP $src_pathname --> $build_dir/src/compiler/glsl/$cxxpp_filename\n"
230 $cxxpp $src_pathname -o $build_dir/src/compiler/glsl/$cxxpp_filename \
231 -I$cc_internal_fixed_incdir \
232 -I$cc_internal_incdir \
233 -I$cxx_internal_incdir \
234 -I$linux_incdir \
235 -I$syslib_incdir \
237 -I$build_dir/src/compiler/glsl \
238 -I$src_dir/src/compiler/glsl \
239 -I$build_dir/src/compiler/nir \
240 -I$src_dir/src/compiler/nir \
241 -I$build_dir/src/compiler \
242 -I$src_dir/src/compiler \
243 -I$build_dir/src/gallium/include \
244 -I$src_dir/src/gallium/include \
245 -I$build_dir/src/mapi \
246 -I$src_dir/src/mapi \
247 -I$build_dir/src/mesa \
248 -I$src_dir/src/mesa \
249 -I$build_dir/src \
250 -I$src_dir/src \
251 -I$build_dir/include \
252 -I$src_dir/include \
254 $syslib_cpp_flags_defs \
255 $linux_cpp_flags_defs \
256 $cc_builtins_cpp_flags_defs \
257 $cc_attributes_cpp_flags_defs \
258 $mesa_cpp_flags_defs \
260 $external_deps_cpp_flags &
261 done
262 #------------------------------------------------------------------------------
263 wait
264 #------------------------------------------------------------------------------
265 for src_pathname in $libglsl_cxx_pathnames
267 cxxpp_filename=$(basename $src_pathname .cpp).cpp.cxx
268 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
269 printf "CXX_S $build_dir/src/compiler/glsl/$cxxpp_filename --> $build_dir/src/compiler/glsl/$asm_filename\n"
270 $cxx_s $build_dir/src/compiler/glsl/$cxxpp_filename -o $build_dir/src/compiler/glsl/$asm_filename &
271 done
272 #------------------------------------------------------------------------------
273 wait
274 #------------------------------------------------------------------------------
275 # reuse os
276 for src_pathname in $libglsl_cxx_pathnames
278 asm_filename=$(basename $src_pathname .cpp).cpp.cxx.s
279 o_filename=$(basename $src_pathname .cpp).cpp.cxx.s.o
280 os="$os $build_dir/src/compiler/glsl/$o_filename"
281 printf "AS $build_dir/src/compiler/glsl/$asm_filename --> $build_dir/src/compiler/glsl/$o_filename\n"
282 $as $build_dir/src/compiler/glsl/$asm_filename -o $build_dir/src/compiler/glsl/$o_filename &
283 done
284 #===============================================================================
285 wait
286 #===============================================================================
287 printf "AR RCS $build_dir/libglsl.a $os\n"
288 $ar_rcs $build_dir/libglsl.a $os
289 #===============================================================================
290 printf "\t<--glsl compiler sub-components built\n"