mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-a74ebffc6a6193445231563cdaa4494933b6c281 / contrib / gbm.sh
blob1de144598c84a53f5a7f1f18ff384b604d39b382
1 echo "building GBM (Generic Buffer Manager) components-->"
2 # only one backend: dri
3 #===============================================================================
4 mkdir -p $build_dir/src/gbm
5 ################################################################################
6 # first the dri backend
7 #-------------------------------------------------------------------------------
8 gbm_dri_c_pathnames="\
9 $src_dir/src/gbm/backends/dri/gbm_dri.c \
11 #-------------------------------------------------------------------------------
12 for src_pathname in $gbm_dri_c_pathnames
14 cpp_filename=$(basename $src_pathname .c).cpp.c
15 printf "CPP $src_pathname --> $build_dir/src/gbm/$cpp_filename\n"
16 $cpp $src_pathname -o $build_dir/src/gbm/$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/gallium/frontends/dri \
23 -I$src_dir/src/gallium/frontends/dri \
24 -I$build_dir/src/gallium/auxiliary \
25 -I$src_dir/src/gallium/auxiliary \
26 -I$build_dir/src/gallium/include \
27 -I$src_dir/src/gallium/include \
28 -I$build_dir/src/gbm/backends/dri \
29 -I$src_dir/src/gbm/backends/dri \
30 -I$build_dir/src/gbm/main \
31 -I$src_dir/src/gbm/main \
32 -I$build_dir/src/mesa \
33 -I$src_dir/src/mesa \
34 -I$build_dir/src/loader \
35 -I$src_dir/src/loader \
36 -I$build_dir/src/ \
37 -I$src_dir/src/ \
38 -I$build_dir/include \
39 -I$src_dir/include \
41 $syslib_cpp_flags_defs \
42 $linux_cpp_flags_defs \
43 $cc_builtins_cpp_flags_defs \
44 $cc_attributes_cpp_flags_defs \
45 $mesa_cpp_flags_defs \
47 $external_deps_cpp_flags &
48 done
49 #-------------------------------------------------------------------------------
50 wait
51 #------------------------------------------------------------------------------
52 for src_pathname in $gbm_dri_c_pathnames
54 cpp_filename=$(basename $src_pathname .c).cpp.c
55 asm_filename=$(basename $src_pathname .c).cpp.c.s
56 printf "CC_S $build_dir/src/gbm/$cpp_filename --> $build_dir/src/gbm/$asm_filename\n"
57 $cc_s $build_dir/src/gbm/$cpp_filename -o $build_dir/src/gbm/$asm_filename &
58 done
59 #------------------------------------------------------------------------------
60 wait
61 #------------------------------------------------------------------------------
62 for src_pathname in $gbm_dri_c_pathnames
64 asm_filename=$(basename $src_pathname .c).cpp.c.s
65 o_filename=$(basename $src_pathname .c).cpp.c.s.o
66 printf "AS $build_dir/src/gbm/$asm_filename --> $build_dir/src/gbm/$o_filename\n"
67 $as $build_dir/src/gbm/$asm_filename -o $build_dir/src/gbm/$o_filename &
68 done
69 #-------------------------------------------------------------------------------
70 #===============================================================================
71 wait
72 #===============================================================================
73 mkdir -p \
74 $build_dir/install_root$libdir/gbm \
75 $build_dir/install_root$libdir_store/gbm
76 #-------------------------------------------------------------------------------
77 printf "BINUTILS LD $build_dir/install_root$libdir_store/gbm/dri_gbm.so\n"
78 $binutils_ld -o $build_dir/install_root$libdir_store/gbm/dri_gbm.so \
79 -shared \
80 -soname dri_gbm.so \
81 --no-undefined \
82 --gc-sections \
83 -s \
84 $syslib_ld_slib_start_files \
85 $cc_ld_slib_start_files \
86 $build_dir/src/gbm/gbm_dri.cpp.c.s.o \
88 $build_dir/libloader.a \
89 $build_dir/libxmlconfig.a \
90 $build_dir/libmesa_util.a \
92 --as-needed \
93 $build_dir/install_root$libdir_store/libgallium_dri.so \
94 $libdrm_ld_flags \
95 $syslibs_libm_ld_flags \
96 $syslibs_libdl_ld_flags \
97 $syslibs_libpthread_ld_flags \
98 $syslibs_libc_ld_flags \
99 --no-as-needed \
100 $cc_ld_slib_end_files \
101 $syslib_ld_slib_end_files
102 #-------------------------------------------------------------------------------
103 ln -sf $libdir_store_virtual/gbm/dri_gbm.so $build_dir/install_root$libdir/gbm/dri_gbm.so
104 ################################################################################
105 # now the gbm itself
106 gbm_c_pathnames="\
107 $src_dir/src/gbm/main/backend.c \
108 $src_dir/src/gbm/main/gbm.c \
110 #-------------------------------------------------------------------------------
111 for src_pathname in $gbm_c_pathnames
113 cpp_filename=$(basename $src_pathname .c).cpp.c
114 printf "CPP $src_pathname --> $build_dir/src/gbm/$cpp_filename\n"
115 $cpp $src_pathname -o $build_dir/src/gbm/$cpp_filename \
116 -DDEFAULT_BACKENDS_PATH=\"$libdir/gbm\" \
118 -I$cc_internal_fixed_incdir \
119 -I$cc_internal_incdir \
120 -I$linux_incdir \
121 -I$syslib_incdir \
123 -I$build_dir/src/gallium/frontends/dri \
124 -I$src_dir/src/gallium/frontends/dri \
125 -I$build_dir/src/gallium/auxiliary \
126 -I$src_dir/src/gallium/auxiliary \
127 -I$build_dir/src/gallium/include \
128 -I$src_dir/src/gallium/include \
129 -I$build_dir/src/gbm/backends/dri \
130 -I$src_dir/src/gbm/backends/dri \
131 -I$build_dir/src/gbm/main \
132 -I$src_dir/src/gbm/main \
133 -I$build_dir/src/mesa \
134 -I$src_dir/src/mesa \
135 -I$build_dir/src/loader \
136 -I$src_dir/src/loader \
137 -I$build_dir/src/ \
138 -I$src_dir/src/ \
139 -I$build_dir/include \
140 -I$src_dir/include \
142 $syslib_cpp_flags_defs \
143 $linux_cpp_flags_defs \
144 $cc_builtins_cpp_flags_defs \
145 $cc_attributes_cpp_flags_defs \
146 $mesa_cpp_flags_defs \
148 $external_deps_cpp_flags &
149 done
150 #-------------------------------------------------------------------------------
151 wait
152 #------------------------------------------------------------------------------
153 for src_pathname in $gbm_c_pathnames
155 cpp_filename=$(basename $src_pathname .c).cpp.c
156 asm_filename=$(basename $src_pathname .c).cpp.c.s
157 printf "CC_S $build_dir/src/gbm/$cpp_filename --> $build_dir/src/gbm/$asm_filename\n"
158 $cc_s $build_dir/src/gbm/$cpp_filename -o $build_dir/src/gbm/$asm_filename &
159 done
160 #------------------------------------------------------------------------------
161 wait
162 #------------------------------------------------------------------------------
163 for src_pathname in $gbm_c_pathnames
165 asm_filename=$(basename $src_pathname .c).cpp.c.s
166 o_filename=$(basename $src_pathname .c).cpp.c.s.o
167 printf "AS $build_dir/src/gbm/$asm_filename --> $build_dir/src/gbm/$o_filename\n"
168 $as $build_dir/src/gbm/$asm_filename -o $build_dir/src/gbm/$o_filename &
169 done
170 #-------------------------------------------------------------------------------
171 #===============================================================================
172 wait
173 #===============================================================================
174 mkdir -p \
175 $build_dir/install_root$libdir \
176 $build_dir/install_root$libdir_store
177 #-------------------------------------------------------------------------------
178 printf "BINUTILS LD $build_dir/install_root$libdir_store/libgbm.so.1.0.0\n"
179 $binutils_ld -o $build_dir/install_root$libdir_store/libgbm.so.1.0.0 \
180 -shared \
181 -soname libgbm.so.1 \
182 --no-undefined \
183 --gc-sections \
184 -s \
185 $syslib_ld_slib_start_files \
186 $cc_ld_slib_start_files \
187 $build_dir/src/gbm/backend.cpp.c.s.o \
188 $build_dir/src/gbm/gbm.cpp.c.s.o \
189 $build_dir/src/gbm/gbm_dri.cpp.c.s.o \
191 $build_dir/libloader.a \
192 $build_dir/libxmlconfig.a \
193 $build_dir/libmesa_util.a \
195 --as-needed \
196 $build_dir/install_root$libdir_store/libgallium_dri.so \
197 $libdrm_ld_flags \
198 $syslibs_libm_ld_flags \
199 $syslibs_libdl_ld_flags \
200 $syslibs_libpthread_ld_flags \
201 $syslibs_libc_ld_flags \
202 --no-as-needed \
203 $cc_ld_slib_end_files \
204 $syslib_ld_slib_end_files
205 #-------------------------------------------------------------------------------
206 ln -sf $libdir_store_virtual/libgbm.so.1.0.0 $build_dir/install_root$libdir/libgbm.so.1
207 ln -sf libgbm.so.1.0.0 $build_dir/install_root$libdir_store/libgbm.so
208 #===============================================================================
209 mkdir -p $build_dir/install_root$incdir_store
210 cp -f $src_dir/src/gbm/main/gbm.h $build_dir/install_root$incdir_store
211 #===============================================================================
212 echo "<--GBM components built"