libXfixes:moved to "simplified /usr"
[nyanlinux.git] / builders / mesa-gl-amd-sh-e14d1f5bc0a0579e8a9934c96a6ca22646da06ac / contrib / gbm.sh
blob1fc678bbfe35ff703adf8e2f69329ba8a7cdd645
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/frontends/dri \
25 -I$src_dir/src/gallium/frontends/dri \
26 -I$build_dir/src/gallium/auxiliary \
27 -I$src_dir/src/gallium/auxiliary \
28 -I$build_dir/src/gallium/include \
29 -I$src_dir/src/gallium/include \
30 -I$build_dir/src/gbm/backends/dri \
31 -I$src_dir/src/gbm/backends/dri \
32 -I$build_dir/src/gbm/main \
33 -I$src_dir/src/gbm/main \
34 -I$build_dir/src/mesa \
35 -I$src_dir/src/mesa \
36 -I$build_dir/src/loader \
37 -I$src_dir/src/loader \
38 -I$build_dir/src/ \
39 -I$src_dir/src/ \
40 -I$build_dir/include \
41 -I$src_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 &
50 done
51 #-------------------------------------------------------------------------------
52 wait
53 #------------------------------------------------------------------------------
54 for src_pathname in $gbm_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/gbm/$cpp_filename --> $build_dir/src/gbm/$asm_filename\n"
59 $cc_s $build_dir/src/gbm/$cpp_filename -o $build_dir/src/gbm/$asm_filename &
60 done
61 #------------------------------------------------------------------------------
62 wait
63 #------------------------------------------------------------------------------
64 for src_pathname in $gbm_c_pathnames
66 asm_filename=$(basename $src_pathname .c).cpp.c.s
67 o_filename=$(basename $src_pathname .c).cpp.c.s.o
68 printf "AS $build_dir/src/gbm/$asm_filename --> $build_dir/src/gbm/$o_filename\n"
69 $as $build_dir/src/gbm/$asm_filename -o $build_dir/src/gbm/$o_filename &
70 done
71 #-------------------------------------------------------------------------------
72 #===============================================================================
73 wait
74 #===============================================================================
75 mkdir -p \
76 $build_dir/install_root$libdir \
77 $build_dir/install_root$libdir_store
78 #-------------------------------------------------------------------------------
79 printf "BINUTILS LD $build_dir/install_root$libdir_store/libgbm.so.1.0.0\n"
80 $binutils_ld -o $build_dir/install_root$libdir_store/libgbm.so.1.0.0 \
81 -shared \
82 -soname libgbm.so.1 \
83 --no-undefined \
84 --gc-sections \
85 -s \
86 $syslib_ld_slib_start_files \
87 $cc_ld_slib_start_files \
88 $build_dir/src/gbm/backend.cpp.c.s.o \
89 $build_dir/src/gbm/gbm.cpp.c.s.o \
90 $build_dir/src/gbm/gbm_dri.cpp.c.s.o \
92 $build_dir/libloader.a \
93 $build_dir/libxmlconfig.a \
94 $build_dir/libmesa_util.a \
96 --as-needed \
97 $build_dir/install_root$libdir_store/libgallium_dri.so \
98 $libdrm_ld_flags \
99 $syslibs_libm_ld_flags \
100 $syslibs_libdl_ld_flags \
101 $syslibs_libpthread_ld_flags \
102 $syslibs_libc_ld_flags \
103 --no-as-needed \
104 $cc_ld_slib_end_files \
105 $syslib_ld_slib_end_files
106 #-------------------------------------------------------------------------------
107 ln -sf $libdir_store_virtual/libgbm.so.1.0.0 $build_dir/install_root$libdir/libgbm.so.1
108 ln -sf libgbm.so.1.0.0 $build_dir/install_root$libdir_store/libgbm.so
109 #===============================================================================
110 mkdir -p $build_dir/install_root$incdir_store
111 cp -f $src_dir/src/gbm/main/gbm.h $build_dir/install_root$incdir_store
112 #===============================================================================
113 echo "<--GBM components built"