3 # Look for "unset", you'll find the values you can override in $1 or
4 # $build_dir/local_conf.sh file, that in order to tune the script for your
5 # specific distro/needs.
7 # Usage, drop the script at the top of mesa source tree, create somewhere else
8 # a build directory, cd into it, and call from there this script.
10 # XXX: the defaults are for our custom distro
11 #===================================================================================================
12 # build dir and src dir
13 build_dir
=$
(realpath .
)
14 echo "build_dir=$build_dir"
16 src_dir
=$
(realpath $
(dirname $0)/..
)
17 echo "src_dir=$src_dir"
18 #===================================================================================================
19 # the current configur-able variables may be individually overridden with the
20 # content of the file in $1 or $build_dir/local_conf.sh. Look for "unset"
21 # in those scripts to find what you can override to tune the build.
25 if test -f $build_dir/local_conf.sh
; then
26 .
$build_dir/local_conf.sh
29 #===================================================================================================
30 if test "${xorgproto_inc_dir-unset}" = unset; then
31 xorgproto_inc_dir
=/nyan
/xorgproto
/current
/include
33 xorgproto_cppflags
="-I$xorgproto_inc_dir"
34 #===================================================================================================
35 if test "${libx11_inc_dir-unset}" = unset; then
36 libx11_inc_dir
=/nyan
/libX11
/current
/include
38 libx11_cppflags
="-I$libx11_inc_dir"
39 #---------------------------------------------------------------------------------------------------
40 if test "${libx11_lib_dir-unset}" = unset; then
41 libx11_lib_dir
=/nyan
/libX11
/current
/lib
43 libx11_ldflags
="-L$libx11_lib_dir -lX11"
44 #===================================================================================================
45 if test "${libxext_inc_dir-unset}" = unset; then
46 libxext_inc_dir
=/nyan
/libXext
/current
/include
48 libxext_cppflags
="-I$libxext_inc_dir"
49 #---------------------------------------------------------------------------------------------------
50 if test "${libxext_lib_dir-unset}" = unset; then
51 libxext_lib_dir
=/nyan
/libXext
/current
/lib
53 libxext_ldflags
="-L$libxext_lib_dir -lXext"
54 #===================================================================================================
55 if test "${cpp-unset}" = unset; then
57 -isystem /nyan/glibc/current/include \
58 -isystem /nyan/linux-headers/current/include \
61 #===================================================================================================
62 if test "${slib_cc-unset}" = unset; then
64 -isystem /nyan/glibc/current/include \
65 -isystem /nyan/linux-headers/current/include \
67 -pipe -fPIC -O2 -ftls-model=global-dynamic -fpic \
70 #===================================================================================================
71 # we are still using the compiler driver, very bad idea
72 if test "${slib_ccld-unset}" = unset; then
76 -B/nyan/glibc/current/lib \
77 -L/nyan/glibc/current/lib \
78 -Wl,-soname=libXinerama.so.1 \
83 #===================================================================================================
94 -DHAVE_SYS_TYPES_H=1 \
97 #===================================================================================================
99 $src_dir/src/Xinerama.c
101 #===================================================================================================
104 cpp_file
=$
(basename $f .c
).cpp.c
105 printf "CPP $f -> $build_dir/$cpp_file\n"
106 $cpp -o $build_dir/$cpp_file $f \
109 $xorgproto_cppflags \
113 #===================================================================================================
115 #===================================================================================================
119 cpp_file
=$
(basename $f .c
).cpp.c
120 o_file
=$
(basename $f .c
).o
122 printf "SLIB_CC $build_dir/$cpp_file -> $build_dir/$o_file\n"
123 $slib_cc -o $build_dir/$o_file $build_dir/$cpp_file &
125 #===================================================================================================
127 #===================================================================================================
128 # see $archive/src/Makefile.am for the libtool version
129 printf "SLIB_CCLD $build_dir/libXinerama.so.1.0.0\n"
130 $slib_ccld -o $build_dir/libXinerama.so
.1.0.0 $os \
133 #===================================================================================================