1 printf "\tbuilding winsys sub-components-->\n"
2 ####################################################################################################
3 # we will put the compilation objects of all winsys-es there:
4 mkdir
-p $build_dir/src
/gallium
/winsys
5 #---------------------------------------------------------------------------------------------------
6 libgallium_winsys_amdgpu_drm_c_pathnames
="\
7 $src_dir/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c \
8 $src_dir/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c \
9 $src_dir/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c \
11 # Blame the intellectual masturbator for that crap of c++ template (c11 generic
12 # is same same though) tantrum about code factorization at the price of pulling
14 # Marek Olšák <maraeo@gmail.com> (if he keeps doing that and does not fix it,
15 # should be fired from amd, if still over there though since this is a red flag)
16 # The initial crappification did happen there:
17 # f933536517c98f7baf60d0fd5d8d0b0e49cb4592
18 # 3e118c6d2f7eb7aa138b96305d828bd9cc4e9e5b
19 libgallium_winsys_amdgpu_drm_cxx_pathnames
="\
20 $src_dir/src/gallium/winsys/amdgpu/drm/amdgpu_cs.cpp \
22 #---------------------------------------------------------------------------------------------------
23 for src_pathname
in $libgallium_winsys_amdgpu_drm_c_pathnames
25 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
26 printf "CPP $src_pathname --> $build_dir/src/gallium/winsys/$cpp_filename\n"
27 $cpp $src_pathname -o $build_dir/src
/gallium
/winsys
/$cpp_filename \
28 -I$cc_internal_fixed_incdir \
29 -I$cc_internal_incdir \
33 -I$build_dir/src
/gallium
/auxiliary \
34 -I$src_dir/src
/gallium
/auxiliary \
35 -I$build_dir/src
/gallium
/include \
36 -I$src_dir/src
/gallium
/include \
37 -I$build_dir/src
/amd
/common \
38 -I$src_dir/src
/amd
/common \
39 -I$build_dir/src
/amd \
43 -I$build_dir/include \
46 $syslib_cpp_flags_defs \
47 $linux_cpp_flags_defs \
48 $cc_builtins_cpp_flags_defs \
49 $cc_attributes_cpp_flags_defs \
50 $mesa_cpp_flags_defs \
52 $external_deps_cpp_flags &
54 # we don't add cxx_internal_incdir because the crappification was "pure c++"
55 for src_pathname
in $libgallium_winsys_amdgpu_drm_cxx_pathnames
57 cpp_filename
=$
(basename $src_pathname .cpp
).cpp.cxx
58 printf "CXXPP $src_pathname --> $build_dir/src/gallium/winsys/$cpp_filename\n"
59 $cxxpp $src_pathname -o $build_dir/src
/gallium
/winsys
/$cpp_filename \
60 -I$cc_internal_fixed_incdir \
61 -I$cc_internal_incdir \
65 -I$build_dir/src
/gallium
/auxiliary \
66 -I$src_dir/src
/gallium
/auxiliary \
67 -I$build_dir/src
/gallium
/include \
68 -I$src_dir/src
/gallium
/include \
69 -I$build_dir/src
/amd
/common \
70 -I$src_dir/src
/amd
/common \
71 -I$build_dir/src
/amd \
75 -I$build_dir/include \
78 $syslib_cpp_flags_defs \
79 $linux_cpp_flags_defs \
80 $cc_builtins_cpp_flags_defs \
81 $cc_attributes_cpp_flags_defs \
82 $mesa_cpp_flags_defs \
84 $external_deps_cpp_flags &
86 #---------------------------------------------------------------------------------------------------
88 #---------------------------------------------------------------------------------------------------
89 for src_pathname
in $libgallium_winsys_amdgpu_drm_c_pathnames
91 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
92 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
93 printf "CC_S $build_dir/src/gallium/winsys/$cpp_filename --> $build_dir/src/gallium/winsys/$asm_filename\n"
94 $cc_s $build_dir/src
/gallium
/winsys
/$cpp_filename -o $build_dir/src
/gallium
/winsys
/$asm_filename &
97 for src_pathname
in $libgallium_winsys_amdgpu_drm_cxx_pathnames
99 cpp_filename
=$
(basename $src_pathname .cpp
).cpp.cxx
100 asm_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s
101 printf "CXX_S $build_dir/src/gallium/winsys/$cpp_filename --> $build_dir/src/gallium/winsys/$asm_filename\n"
102 $cxx_s $build_dir/src
/gallium
/winsys
/$cpp_filename -o $build_dir/src
/gallium
/winsys
/$asm_filename &
104 #---------------------------------------------------------------------------------------------------
106 #---------------------------------------------------------------------------------------------------
108 for src_pathname
in $libgallium_winsys_amdgpu_drm_c_pathnames
110 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
111 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
112 os
="$os $build_dir/src/gallium/winsys/$o_filename"
113 printf "AS $build_dir/src/gallium/winsys/$asm_filename --> $build_dir/src/gallium/winsys/$o_filename\n"
114 $as $build_dir/src
/gallium
/winsys
/$asm_filename -o $build_dir/src
/gallium
/winsys
/$o_filename &
117 for src_pathname
in $libgallium_winsys_amdgpu_drm_cxx_pathnames
119 asm_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s
120 o_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s.o
121 os
="$os $build_dir/src/gallium/winsys/$o_filename"
122 printf "AS $build_dir/src/gallium/winsys/$asm_filename --> $build_dir/src/gallium/winsys/$o_filename\n"
123 $as $build_dir/src
/gallium
/winsys
/$asm_filename -o $build_dir/src
/gallium
/winsys
/$o_filename &
125 #---------------------------------------------------------------------------------------------------
127 #---------------------------------------------------------------------------------------------------
128 printf "AR RCS $build_dir/libgallium_winsys_amdgpu_drm.a $os\n"
129 $ar_rcs $build_dir/libgallium_winsys_amdgpu_drm.a
$os
130 ####################################################################################################
131 ####################################################################################################
132 ####################################################################################################
133 ####################################################################################################
134 # XXX: We add the additional gallium sw winsys-s even though we have no drivers using any of them:
135 # This is just a compile thing because they were unable to make them cleanly compile-able out as
136 # they should be. With proper C preprocessor namespaces all binaries should be One Compilation Units
138 #===================================================================================================
139 # the pure sw dri winsys
140 libgallium_winsys_sw_dri_c_pathnames
="\
141 $src_dir/src/gallium/winsys/sw/dri/dri_sw_winsys.c \
143 for src_pathname
in $libgallium_winsys_sw_dri_c_pathnames
145 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
146 printf "CPP $src_pathname --> $build_dir/src/gallium/winsys/$cpp_filename\n"
147 $cpp $src_pathname -o $build_dir/src
/gallium
/winsys
/$cpp_filename \
148 -I$cc_internal_fixed_incdir \
149 -I$cc_internal_incdir \
153 -I$build_dir/src
/gallium
/auxiliary \
154 -I$src_dir/src
/gallium
/auxiliary \
155 -I$build_dir/src
/gallium
/include \
156 -I$src_dir/src
/gallium
/include \
159 -I$build_dir/include \
162 $syslib_cpp_flags_defs \
163 $linux_cpp_flags_defs \
164 $cc_builtins_cpp_flags_defs \
165 $cc_attributes_cpp_flags_defs \
166 $mesa_cpp_flags_defs \
168 $external_deps_cpp_flags &
170 #---------------------------------------------------------------------------------------------------
172 #---------------------------------------------------------------------------------------------------
173 for src_pathname
in $libgallium_winsys_sw_dri_c_pathnames
175 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
176 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
177 printf "CC_S $build_dir/src/gallium/winsys/$cpp_filename --> $build_dir/src/gallium/winsys/$asm_filename\n"
178 $cc_s $build_dir/src
/gallium
/winsys
/$cpp_filename -o $build_dir/src
/gallium
/winsys
/$asm_filename &
180 #---------------------------------------------------------------------------------------------------
182 #---------------------------------------------------------------------------------------------------
184 for src_pathname
in $libgallium_winsys_sw_dri_c_pathnames
186 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
187 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
188 os
="$os $build_dir/src/gallium/winsys/$o_filename"
189 printf "AS $build_dir/src/gallium/winsys/$asm_filename --> $build_dir/src/gallium/winsys/$o_filename\n"
190 $as $build_dir/src
/gallium
/winsys
/$asm_filename -o $build_dir/src
/gallium
/winsys
/$o_filename &
192 #---------------------------------------------------------------------------------------------------
194 #---------------------------------------------------------------------------------------------------
195 printf "AR RCS $build_dir/libgallium_winsys_sw_dri.a $os\n"
196 $ar_rcs $build_dir/libgallium_winsys_sw_dri.a
$os
197 #===================================================================================================
198 # the sw kms dri winsys
199 libgallium_winsys_sw_kms_dri_c_pathnames
="\
200 $src_dir/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c \
202 for src_pathname
in $libgallium_winsys_sw_kms_dri_c_pathnames
204 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
205 printf "CPP $src_pathname --> $build_dir/src/gallium/winsys/$cpp_filename\n"
206 $cpp $src_pathname -o $build_dir/src
/gallium
/winsys
/$cpp_filename \
207 -I$cc_internal_fixed_incdir \
208 -I$cc_internal_incdir \
212 -I$build_dir/src
/gallium
/auxiliary \
213 -I$src_dir/src
/gallium
/auxiliary \
214 -I$build_dir/src
/gallium
/include \
215 -I$src_dir/src
/gallium
/include \
218 -I$build_dir/include \
221 $syslib_cpp_flags_defs \
222 $linux_cpp_flags_defs \
223 $cc_builtins_cpp_flags_defs \
224 $cc_attributes_cpp_flags_defs \
225 $mesa_cpp_flags_defs \
227 $external_deps_cpp_flags &
229 #---------------------------------------------------------------------------------------------------
231 #---------------------------------------------------------------------------------------------------
232 for src_pathname
in $libgallium_winsys_sw_kms_dri_c_pathnames
234 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
235 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
236 printf "CC_S $build_dir/src/gallium/winsys/$cpp_filename --> $build_dir/src/gallium/winsys/$asm_filename\n"
237 $cc_s $build_dir/src
/gallium
/winsys
/$cpp_filename -o $build_dir/src
/gallium
/winsys
/$asm_filename &
239 #---------------------------------------------------------------------------------------------------
241 #---------------------------------------------------------------------------------------------------
243 for src_pathname
in $libgallium_winsys_sw_kms_dri_c_pathnames
245 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
246 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
247 os
="$os $build_dir/src/gallium/winsys/$o_filename"
248 printf "AS $build_dir/src/gallium/winsys/$asm_filename --> $build_dir/src/gallium/winsys/$o_filename\n"
249 $as $build_dir/src
/gallium
/winsys
/$asm_filename -o $build_dir/src
/gallium
/winsys
/$o_filename &
251 #---------------------------------------------------------------------------------------------------
253 #---------------------------------------------------------------------------------------------------
254 printf "AR RCS $build_dir/libgallium_winsys_sw_kms_dri.a $os\n"
255 $ar_rcs $build_dir/libgallium_winsys_sw_kms_dri.a
$os
256 #===================================================================================================
258 libgallium_winsys_sw_null_c_pathnames
="\
259 $src_dir/src/gallium/winsys/sw/null/null_sw_winsys.c \
261 for src_pathname
in $libgallium_winsys_sw_null_c_pathnames
263 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
264 printf "CPP $src_pathname --> $build_dir/src/gallium/winsys/$cpp_filename\n"
265 $cpp $src_pathname -o $build_dir/src
/gallium
/winsys
/$cpp_filename \
266 -I$cc_internal_fixed_incdir \
267 -I$cc_internal_incdir \
271 -I$build_dir/src
/gallium
/auxiliary \
272 -I$src_dir/src
/gallium
/auxiliary \
273 -I$build_dir/src
/gallium
/include \
274 -I$src_dir/src
/gallium
/include \
277 -I$build_dir/include \
280 $syslib_cpp_flags_defs \
281 $linux_cpp_flags_defs \
282 $cc_builtins_cpp_flags_defs \
283 $cc_attributes_cpp_flags_defs \
284 $mesa_cpp_flags_defs \
286 $external_deps_cpp_flags &
288 #---------------------------------------------------------------------------------------------------
290 #---------------------------------------------------------------------------------------------------
291 for src_pathname
in $libgallium_winsys_sw_null_c_pathnames
293 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
294 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
295 printf "CC_S $build_dir/src/gallium/winsys/$cpp_filename --> $build_dir/src/gallium/winsys/$asm_filename\n"
296 $cc_s $build_dir/src
/gallium
/winsys
/$cpp_filename -o $build_dir/src
/gallium
/winsys
/$asm_filename &
298 #---------------------------------------------------------------------------------------------------
300 #---------------------------------------------------------------------------------------------------
302 for src_pathname
in $libgallium_winsys_sw_null_c_pathnames
304 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
305 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
306 os
="$os $build_dir/src/gallium/winsys/$o_filename"
307 printf "AS $build_dir/src/gallium/winsys/$asm_filename --> $build_dir/src/gallium/winsys/$o_filename\n"
308 $as $build_dir/src
/gallium
/winsys
/$asm_filename -o $build_dir/src
/gallium
/winsys
/$o_filename &
310 #---------------------------------------------------------------------------------------------------
312 #---------------------------------------------------------------------------------------------------
313 printf "AR RCS $build_dir/libgallium_winsys_sw_null.a $os\n"
314 $ar_rcs $build_dir/libgallium_winsys_sw_null.a
$os
315 #===================================================================================================
316 # the sw wrapper winsys
317 libgallium_winsys_sw_wrapper_c_pathnames
="\
318 $src_dir/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c \
320 for src_pathname
in $libgallium_winsys_sw_wrapper_c_pathnames
322 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
323 printf "CPP $src_pathname --> $build_dir/src/gallium/winsys/$cpp_filename\n"
324 $cpp $src_pathname -o $build_dir/src
/gallium
/winsys
/$cpp_filename \
325 -I$cc_internal_fixed_incdir \
326 -I$cc_internal_incdir \
330 -I$build_dir/src
/gallium
/auxiliary \
331 -I$src_dir/src
/gallium
/auxiliary \
332 -I$build_dir/src
/gallium
/include \
333 -I$src_dir/src
/gallium
/include \
336 -I$build_dir/include \
339 $syslib_cpp_flags_defs \
340 $linux_cpp_flags_defs \
341 $cc_builtins_cpp_flags_defs \
342 $cc_attributes_cpp_flags_defs \
343 $mesa_cpp_flags_defs \
345 $external_deps_cpp_flags &
347 #---------------------------------------------------------------------------------------------------
349 #---------------------------------------------------------------------------------------------------
350 for src_pathname
in $libgallium_winsys_sw_wrapper_c_pathnames
352 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
353 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
354 printf "CC_S $build_dir/src/gallium/winsys/$cpp_filename --> $build_dir/src/gallium/winsys/$asm_filename\n"
355 $cc_s $build_dir/src
/gallium
/winsys
/$cpp_filename -o $build_dir/src
/gallium
/winsys
/$asm_filename &
357 #---------------------------------------------------------------------------------------------------
359 #---------------------------------------------------------------------------------------------------
361 for src_pathname
in $libgallium_winsys_sw_wrapper_c_pathnames
363 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
364 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
365 os
="$os $build_dir/src/gallium/winsys/$o_filename"
366 printf "AS $build_dir/src/gallium/winsys/$asm_filename --> $build_dir/src/gallium/winsys/$o_filename\n"
367 $as $build_dir/src
/gallium
/winsys
/$asm_filename -o $build_dir/src
/gallium
/winsys
/$o_filename &
369 #---------------------------------------------------------------------------------------------------
371 #---------------------------------------------------------------------------------------------------
372 printf "AR RCS $build_dir/libgallium_winsys_sw_wrapper.a $os\n"
373 $ar_rcs $build_dir/libgallium_winsys_sw_wrapper.a
$os
374 ####################################################################################################
375 printf "\t<--winsys sub-components built\n"