mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-e7ee69b24dd8f668fec5520ab046dac27d2b1d6e / contrib / gbm.sh
blob3dd296f95a2670d32abd401a3899d311eeef70c0
1 echo "building GBM (Generic Buffer Manager) components-->"
2 # only one backend: dri
3 #===============================================================================
4 mkdir -p $build_dir/src/gbm
5 #-------------------------------------------------------------------------------
6 gbm_c_pathnames="\
7 $src_dir/src/gbm/main/backend.c \
8 $src_dir/src/gbm/main/gbm.c \
9 $src_dir/src/gbm/backends/dri/gbm_dri.c \
11 #-------------------------------------------------------------------------------
12 for src_pathname in $gbm_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 -DDEFAULT_BACKENDS_PATH=\"$libdir/gbm\" \
19 -I$cc_internal_fixed_incdir \
20 -I$cc_internal_incdir \
21 -I$linux_incdir \
22 -I$syslib_incdir \
24 -I$build_dir/src/gallium/include \
25 -I$src_dir/src/gallium/include \
26 -I$build_dir/src/gbm/backends/dri \
27 -I$src_dir/src/gbm/backends/dri \
28 -I$build_dir/src/gbm/main \
29 -I$src_dir/src/gbm/main \
30 -I$build_dir/src/loader \
31 -I$src_dir/src/loader \
32 -I$build_dir/src/ \
33 -I$src_dir/src/ \
34 -I$build_dir/include \
35 -I$src_dir/include \
37 $syslib_cpp_flags_defs \
38 $linux_cpp_flags_defs \
39 $cc_builtins_cpp_flags_defs \
40 $cc_attributes_cpp_flags_defs \
41 $mesa_cpp_flags_defs \
43 $external_deps_cpp_flags &
44 done
45 #-------------------------------------------------------------------------------
46 wait
47 #------------------------------------------------------------------------------
48 for src_pathname in $gbm_c_pathnames
50 cpp_filename=$(basename $src_pathname .c).cpp.c
51 asm_filename=$(basename $src_pathname .c).cpp.c.s
52 printf "CC_S $build_dir/src/gbm/$cpp_filename --> $build_dir/src/gbm/$asm_filename\n"
53 $cc_s $build_dir/src/gbm/$cpp_filename -o $build_dir/src/gbm/$asm_filename &
54 done
55 #------------------------------------------------------------------------------
56 wait
57 #------------------------------------------------------------------------------
58 for src_pathname in $gbm_c_pathnames
60 asm_filename=$(basename $src_pathname .c).cpp.c.s
61 o_filename=$(basename $src_pathname .c).cpp.c.s.o
62 printf "AS $build_dir/src/gbm/$asm_filename --> $build_dir/src/gbm/$o_filename\n"
63 $as $build_dir/src/gbm/$asm_filename -o $build_dir/src/gbm/$o_filename &
64 done
65 #-------------------------------------------------------------------------------
66 #===============================================================================
67 wait
68 #===============================================================================
69 mkdir -p \
70 $build_dir/install_root$libdir \
71 $build_dir/install_root$libdir_store
72 #-------------------------------------------------------------------------------
73 printf "BINUTILS LD $build_dir/install_root$libdir_store/libgbm.so.1.0.0\n"
74 $binutils_ld -o $build_dir/install_root$libdir_store/libgbm.so.1.0.0 \
75 -shared \
76 -soname libgbm.so.1 \
77 --no-undefined \
78 --gc-sections \
79 -s \
80 $syslib_ld_slib_start_files \
81 $cc_ld_slib_start_files \
82 $build_dir/src/gbm/backend.cpp.c.s.o \
83 $build_dir/src/gbm/gbm.cpp.c.s.o \
84 $build_dir/src/gbm/gbm_dri.cpp.c.s.o \
86 $build_dir/libloader.a \
87 $build_dir/libxmlconfig.a \
88 $build_dir/libmesa_util.a \
90 --as-needed \
91 $build_dir/install_root$libdir_store/libgallium_dri.so \
92 $libdrm_ld_flags \
93 $syslibs_libm_ld_flags \
94 $syslibs_libdl_ld_flags \
95 $syslibs_libpthread_ld_flags \
96 $syslibs_libc_ld_flags \
97 --no-as-needed \
98 $cc_ld_slib_end_files \
99 $syslib_ld_slib_end_files
100 #-------------------------------------------------------------------------------
101 ln -sf $libdir_store_virtual/libgbm.so.1.0.0 $build_dir/install_root$libdir/libgbm.so.1
102 ln -sf libgbm.so.1.0.0 $build_dir/install_root$libdir_store/libgbm.so
103 #===============================================================================
104 mkdir -p $build_dir/install_root$incdir_store
105 cp -f $src_dir/src/gbm/main/gbm.h $build_dir/install_root$incdir_store
106 #===============================================================================
107 echo "<--GBM components built"