1 printf "\tbuilding winsys sub-components-->\n"
2 #===============================================================================
3 mkdir
-p $build_dir/src
/gallium
/winsys
4 #-------------------------------------------------------------------------------
5 libwinsys_amdgpu_drm_c_pathnames
="\
6 $src_dir/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c \
7 $src_dir/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c \
8 $src_dir/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c \
10 # Blame the intellectual masturbator for that crap of c++ template (c11 generic
11 # is same same though) tantrum about code factorization at the price of pulling
13 # Marek Olšák <maraeo@gmail.com> (if he keeps doing that and does not fix it,
14 # should be fired from amd, if still over there though since this is a red flag)
15 # The initial crappification did happen there:
16 # f933536517c98f7baf60d0fd5d8d0b0e49cb4592
17 # 3e118c6d2f7eb7aa138b96305d828bd9cc4e9e5b
18 libwinsys_amdgpu_drm_cxx_pathnames
="\
19 $src_dir/src/gallium/winsys/amdgpu/drm/amdgpu_cs.cpp \
21 #-------------------------------------------------------------------------------
22 for src_pathname
in $libwinsys_amdgpu_drm_c_pathnames
24 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
25 printf "CPP $src_pathname --> $build_dir/src/gallium/winsys/$cpp_filename\n"
26 $cpp $src_pathname -o $build_dir/src
/gallium
/winsys
/$cpp_filename \
27 -I$cc_internal_fixed_incdir \
28 -I$cc_internal_incdir \
32 -I$build_dir/src
/gallium
/auxiliary \
33 -I$src_dir/src
/gallium
/auxiliary \
34 -I$build_dir/src
/gallium
/include \
35 -I$src_dir/src
/gallium
/include \
36 -I$build_dir/src
/amd
/common \
37 -I$src_dir/src
/amd
/common \
38 -I$build_dir/src
/amd \
42 -I$build_dir/include \
45 $syslib_cpp_flags_defs \
46 $linux_cpp_flags_defs \
47 $cc_builtins_cpp_flags_defs \
48 $cc_attributes_cpp_flags_defs \
49 $mesa_cpp_flags_defs \
51 $external_deps_cpp_flags &
53 # we don't add cxx_internal_incdir because the crappification was "pure c++"
54 for src_pathname
in $libwinsys_amdgpu_drm_cxx_pathnames
56 cpp_filename
=$
(basename $src_pathname .cpp
).cpp.cxx
57 printf "CXXPP $src_pathname --> $build_dir/src/gallium/winsys/$cpp_filename\n"
58 $cxxpp $src_pathname -o $build_dir/src
/gallium
/winsys
/$cpp_filename \
59 -I$cc_internal_fixed_incdir \
60 -I$cc_internal_incdir \
64 -I$build_dir/src
/gallium
/auxiliary \
65 -I$src_dir/src
/gallium
/auxiliary \
66 -I$build_dir/src
/gallium
/include \
67 -I$src_dir/src
/gallium
/include \
68 -I$build_dir/src
/amd
/common \
69 -I$src_dir/src
/amd
/common \
70 -I$build_dir/src
/amd \
74 -I$build_dir/include \
77 $syslib_cpp_flags_defs \
78 $linux_cpp_flags_defs \
79 $cc_builtins_cpp_flags_defs \
80 $cc_attributes_cpp_flags_defs \
81 $mesa_cpp_flags_defs \
83 $external_deps_cpp_flags &
85 #-------------------------------------------------------------------------------
87 #------------------------------------------------------------------------------
88 for src_pathname
in $libwinsys_amdgpu_drm_c_pathnames
90 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
91 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
92 printf "CC_S $build_dir/src/gallium/winsys/$cpp_filename --> $build_dir/src/gallium/winsys/$asm_filename\n"
93 $cc_s $build_dir/src
/gallium
/winsys
/$cpp_filename -o $build_dir/src
/gallium
/winsys
/$asm_filename &
96 for src_pathname
in $libwinsys_amdgpu_drm_cxx_pathnames
98 cpp_filename
=$
(basename $src_pathname .cpp
).cpp.cxx
99 asm_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s
100 printf "CXX_S $build_dir/src/gallium/winsys/$cpp_filename --> $build_dir/src/gallium/winsys/$asm_filename\n"
101 $cxx_s $build_dir/src
/gallium
/winsys
/$cpp_filename -o $build_dir/src
/gallium
/winsys
/$asm_filename &
103 #------------------------------------------------------------------------------
105 #------------------------------------------------------------------------------
107 for src_pathname
in $libwinsys_amdgpu_drm_c_pathnames
109 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
110 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
111 os
="$os $build_dir/src/gallium/winsys/$o_filename"
112 printf "AS $build_dir/src/gallium/winsys/$asm_filename --> $build_dir/src/gallium/winsys/$o_filename\n"
113 $as $build_dir/src
/gallium
/winsys
/$asm_filename -o $build_dir/src
/gallium
/winsys
/$o_filename &
116 for src_pathname
in $libwinsys_amdgpu_drm_cxx_pathnames
118 asm_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s
119 o_filename
=$
(basename $src_pathname .cpp
).cpp.cxx.s.o
120 os
="$os $build_dir/src/gallium/winsys/$o_filename"
121 printf "AS $build_dir/src/gallium/winsys/$asm_filename --> $build_dir/src/gallium/winsys/$o_filename\n"
122 $as $build_dir/src
/gallium
/winsys
/$asm_filename -o $build_dir/src
/gallium
/winsys
/$o_filename &
124 #------------------------------------------------------------------------------
126 #-------------------------------------------------------------------------------
127 printf "AR RCS $build_dir/libwinsys_amdgpu_drm.a $os\n"
128 $ar_rcs $build_dir/libwinsys_amdgpu_drm.a
$os
129 #===============================================================================
130 printf "\t<--winsys sub-components built\n"