gfx stack update
[nyanlinux.git] / builders / mesa-gl-amd-sh-18f4dc6b75b1e3697d40f8c6a39d41179ccd2238 / contrib / gbm.sh
bloba36d9c0b220c89b897dd76eb3360b9e1895c3bf2
1 echo "building GBM (Generic Buffer Manager) components-->"
2 # only one backend, (dri level 2)/drm
3 mkdir -p $build_dir/gbm
5 #===============================================================================
7 $cco_slib -o $build_dir/gbm/backend.o $src_dir/src/gbm/main/backend.c \
8 -DDEFAULT_BACKENDS_PATH=\"$libdir/gbm\" \
9 -I$src_dir/src/gbm/main \
10 -I$src_dir/src/loader \
11 -I$src_dir/include \
13 $cco_slib_common_trailer &
15 #===============================================================================
17 $cco_slib -o $build_dir/gbm/gbm.o $src_dir/src/gbm/main/gbm.c \
18 -I$src_dir/src/gbm/main \
19 -I$src_dir/include \
21 $cco_slib_common_trailer &
23 #===============================================================================
25 $cco_slib -o $build_dir/gbm/gbm_dri.o $src_dir/src/gbm/backends/dri/gbm_dri.c \
26 -I$src_dir/src/gbm/backends/dri \
27 -I$src_dir/src/gbm/main \
28 -I$src_dir/src/loader \
29 -I$src_dir/src/ \
30 -I$src_dir/include \
32 $cco_slib_common_trailer &
34 #===============================================================================
36 wait
38 mkdir -p $build_dir/install_root$libdir
40 if test "${libgbm_link_cmd-unset}" = unset ; then
41 libgbm_link_cmd="\
42 gcc -o $build_dir/install_root$libdir/libgbm.so.1.0.0 -Wl,-soname=libgbm.so.1 \
43 -shared -static-libgcc \
44 -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib \
45 -Wl,-rpath-link,/nyan/glibc/current/lib \
46 -Wl,--no-undefined,--gc-sections \
47 $build_dir/gbm/backend.o \
48 $build_dir/gbm/gbm.o \
49 $build_dir/gbm/gbm_dri.o \
51 $build_dir/libloader.a \
52 $build_dir/libxmlconfig.a \
53 $build_dir/libmesa_util.a \
55 $external_deps_static_ldflags \
56 -Wl,--exclude-libs,$external_deps_archives \
58 -Wl,--as-needed \
59 $external_deps_ldflags \
60 $glibc_ldflags \
61 -Wl,--no-as-needed\
64 eval $libgbm_link_cmd
66 ln -sf libgbm.so.1.0.0 $build_dir/install_root$libdir/libgbm.so.1
67 ln -sf libgbm.so.1 $build_dir/install_root$libdir/libgbm.so
69 #===============================================================================
71 mkdir -p $build_dir/install_root$libdir/pkgconfig
73 cp -f $src_dir/contrib/pkgconfig/gbm.pc.in $build_dir/install_root$libdir/pkgconfig/gbm.pc
74 sed -i "\
75 s:@prefix@:$prefix:;\
76 s:@exec_prefix@:$prefix:;\
77 s:@libdir@:$libdir:;\
78 s:@includedir@:$incdir:;\
79 s:@gbmbackendspath@:$libdir/gbm:;\
80 s:@GBM_PC_REQ_PRIV@::;\
81 s:@VERSION@:$version:;\
82 s:@GBM_PC_LIB_PRIV@::;\
83 " $build_dir/install_root$libdir/pkgconfig/gbm.pc
85 #------------------------------------------------------------------------------
87 mkdir -p $build_dir/install_root$incdir
89 cp -f $src_dir/src/gbm/main/gbm.h $build_dir/install_root$incdir
90 echo "<--GBM components built"