Gfx stack update
[nyanlinux.git] / builders / mesa-gl-amd-sh-0976dfeca29527c2175c6925d46cba84391910c3 / contrib / gbm.sh
blob6eb6ee2f430def4ed94879891e207e97a69f35db
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$build_dir/src/gbm/main \
10 -I$src_dir/src/gbm/main \
11 -I$build_dir/src/loader \
12 -I$src_dir/src/loader \
13 -I$build_dir/include \
14 -I$src_dir/include \
16 $cco_slib_common_trailer &
18 #===============================================================================
20 $cco_slib -o $build_dir/gbm/gbm.o $src_dir/src/gbm/main/gbm.c \
21 -I$build_dir/src/gbm/main \
22 -I$src_dir/src/gbm/main \
23 -I$build_dir/include \
24 -I$src_dir/include \
26 $cco_slib_common_trailer &
28 #===============================================================================
30 $cco_slib -o $build_dir/gbm/gbm_dri.o $src_dir/src/gbm/backends/dri/gbm_dri.c \
31 -I$build_dir/src/gbm/backends/dri \
32 -I$src_dir/src/gbm/backends/dri \
33 -I$build_dir/src/gbm/main \
34 -I$src_dir/src/gbm/main \
35 -I$build_dir/src/loader \
36 -I$src_dir/src/loader \
37 -I$build_dir/src/ \
38 -I$src_dir/src/ \
39 -I$build_dir/include \
40 -I$src_dir/include \
42 $cco_slib_common_trailer &
44 #===============================================================================
46 wait
48 mkdir -p $build_dir/install_root$libdir
50 if test "${libgbm_link_cmd-unset}" = unset ; then
51 libgbm_link_cmd="\
52 gcc -o $build_dir/install_root$libdir/libgbm.so.1.0.0 -Wl,-soname=libgbm.so.1 \
53 -shared -static-libgcc \
54 -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib \
55 -Wl,-rpath-link,/nyan/glibc/current/lib \
56 -Wl,--no-undefined,--gc-sections \
57 $build_dir/gbm/backend.o \
58 $build_dir/gbm/gbm.o \
59 $build_dir/gbm/gbm_dri.o \
61 $build_dir/libloader.a \
62 $build_dir/libxmlconfig.a \
63 $build_dir/libmesa_util.a \
65 $external_deps_static_ldflags \
66 -Wl,--exclude-libs,$external_deps_archives \
68 -Wl,--as-needed \
69 $external_deps_ldflags \
70 $glibc_ldflags \
71 -Wl,--no-as-needed\
74 eval $libgbm_link_cmd
76 ln -sf libgbm.so.1.0.0 $build_dir/install_root$libdir/libgbm.so.1
77 ln -sf libgbm.so.1 $build_dir/install_root$libdir/libgbm.so
79 #===============================================================================
81 mkdir -p $build_dir/install_root$libdir/pkgconfig
83 cp -f $src_dir/contrib/pkgconfig/gbm.pc.in $build_dir/install_root$libdir/pkgconfig/gbm.pc
84 sed -i "\
85 s:@prefix@:$prefix:;\
86 s:@exec_prefix@:$prefix:;\
87 s:@libdir@:$libdir:;\
88 s:@includedir@:$incdir:;\
89 s:@gbmbackendspath@:$libdir/gbm:;\
90 s:@GBM_PC_REQ_PRIV@::;\
91 s:@VERSION@:$version:;\
92 s:@GBM_PC_LIB_PRIV@::;\
93 " $build_dir/install_root$libdir/pkgconfig/gbm.pc
95 #------------------------------------------------------------------------------
97 mkdir -p $build_dir/install_root$incdir
99 cp -f $src_dir/src/gbm/main/gbm.h $build_dir/install_root$incdir
100 echo "<--GBM components built"