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 \
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 \
34 -I$build_dir/src
/main \
36 -I$build_dir/src
/mesa \
40 -I$build_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 &
51 #-------------------------------------------------------------------------------
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 &
61 #------------------------------------------------------------------------------
63 #------------------------------------------------------------------------------
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 &
73 #------------------------------------------------------------------------------
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
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_flatten_nested_if_blocks.cpp \
154 $src_dir/src/compiler/glsl/opt_flip_matrices.cpp \
155 $src_dir/src/compiler/glsl/opt_function_inlining.cpp \
156 $src_dir/src/compiler/glsl/opt_if_simplification.cpp \
157 $src_dir/src/compiler/glsl/opt_minmax.cpp \
158 $src_dir/src/compiler/glsl/opt_rebalance_tree.cpp \
159 $src_dir/src/compiler/glsl/opt_tree_grafting.cpp \
160 $src_dir/src/compiler/glsl/propagate_invariance.cpp \
161 $src_dir/src/compiler/glsl/s_expression.cpp \
162 $src_dir/src/compiler/glsl/string_to_uint_map.cpp \
163 $src_dir/src/compiler/glsl/serialize.cpp \
164 $src_dir/src/compiler/glsl/shader_cache.cpp \
166 #-------------------------------------------------------------------------------
167 for src_pathname
in $libglsl_c_pathnames
169 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
170 printf "CPP $src_pathname --> $build_dir/src/compiler/glsl/$cpp_filename\n"
171 $cpp $src_pathname -o $build_dir/src
/compiler
/glsl
/$cpp_filename \
172 -I$cc_internal_fixed_incdir \
173 -I$cc_internal_incdir \
177 -I$build_dir/src
/compiler
/glsl \
178 -I$src_dir/src
/compiler
/glsl \
179 -I$build_dir/src
/compiler
/nir \
180 -I$src_dir/src
/compiler
/nir \
181 -I$build_dir/src
/compiler \
182 -I$src_dir/src
/compiler \
183 -I$build_dir/src
/gallium
/include \
184 -I$src_dir/src
/gallium
/include \
185 -I$build_dir/src
/mapi \
186 -I$src_dir/src
/mapi \
187 -I$build_dir/src
/mesa \
188 -I$src_dir/src
/mesa \
191 -I$build_dir/include \
194 $syslib_cpp_flags_defs \
195 $linux_cpp_flags_defs \
196 $cc_builtins_cpp_flags_defs \
197 $cc_attributes_cpp_flags_defs \
198 $mesa_cpp_flags_defs \
200 $external_deps_cpp_flags &
202 #-------------------------------------------------------------------------------
204 #------------------------------------------------------------------------------
205 for src_pathname
in $libglsl_c_pathnames
207 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
208 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
209 printf "CC_S $build_dir/src/compiler/glsl/$cpp_filename --> $build_dir/src/compiler/glsl/$asm_filename\n"
210 $cc_s $build_dir/src
/compiler
/glsl
/$cpp_filename -o $build_dir/src
/compiler
/glsl
/$asm_filename &
212 #------------------------------------------------------------------------------
214 #------------------------------------------------------------------------------
216 for src_pathname
in $libglsl_c_pathnames
218 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
219 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
220 os
="$os $build_dir/src/compiler/glsl/$o_filename"
221 printf "AS $build_dir/src/compiler/glsl/$asm_filename --> $build_dir/src/compiler/glsl/$o_filename\n"
222 $as $build_dir/src
/compiler
/glsl
/$asm_filename -o $build_dir/src
/compiler
/glsl
/$o_filename &
224 #===============================================================================
225 for src_pathname
in $libglsl_cxx_pathnames
227 cxxpp_filename
=$
(basename $src_pathname .cpp
).cpp.cxx
228 printf "CXXPP $src_pathname --> $build_dir/src/compiler/glsl/$cxxpp_filename\n"
229 $cxxpp $src_pathname -o $build_dir/src
/compiler
/glsl
/$cxxpp_filename \
230 -I$cc_internal_fixed_incdir \
231 -I$cc_internal_incdir \
232 -I$cxx_internal_incdir \
236 -I$build_dir/src
/compiler
/glsl \
237 -I$src_dir/src
/compiler
/glsl \
238 -I$build_dir/src
/compiler
/nir \
239 -I$src_dir/src
/compiler
/nir \
240 -I$build_dir/src
/compiler \
241 -I$src_dir/src
/compiler \
242 -I$build_dir/src
/gallium
/include \
243 -I$src_dir/src
/gallium
/include \
244 -I$build_dir/src
/mapi \
245 -I$src_dir/src
/mapi \
246 -I$build_dir/src
/mesa \
247 -I$src_dir/src
/mesa \
250 -I$build_dir/include \
253 $syslib_cpp_flags_defs \
254 $linux_cpp_flags_defs \
255 $cc_builtins_cpp_flags_defs \
256 $cc_attributes_cpp_flags_defs \
257 $mesa_cpp_flags_defs \
259 $external_deps_cpp_flags &
261 #------------------------------------------------------------------------------
263 #------------------------------------------------------------------------------
264 for src_pathname
in $libglsl_cxx_pathnames
266 cxxpp_filename
=$
(basename $src_pathname .cpp
).cpp.cxx
267 asm_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s
268 printf "CXX_S $build_dir/src/compiler/glsl/$cxxpp_filename --> $build_dir/src/compiler/glsl/$asm_filename\n"
269 $cxx_s $build_dir/src
/compiler
/glsl
/$cxxpp_filename -o $build_dir/src
/compiler
/glsl
/$asm_filename &
271 #------------------------------------------------------------------------------
273 #------------------------------------------------------------------------------
275 for src_pathname
in $libglsl_cxx_pathnames
277 asm_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s
278 o_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s.o
279 os
="$os $build_dir/src/compiler/glsl/$o_filename"
280 printf "AS $build_dir/src/compiler/glsl/$asm_filename --> $build_dir/src/compiler/glsl/$o_filename\n"
281 $as $build_dir/src
/compiler
/glsl
/$asm_filename -o $build_dir/src
/compiler
/glsl
/$o_filename &
283 #===============================================================================
285 #===============================================================================
286 printf "AR RCS $build_dir/libglsl.a $os\n"
287 $ar_rcs $build_dir/libglsl.a
$os
288 #===============================================================================
289 printf "\t<--glsl compiler sub-components built\n"