6 REQUIRED="core datafile fs strings io"
7 CFLAGS="-Iinclude `pkg-config --cflags sigc++-2.0`"
8 LIBS="`pkg-config --libs sigc++-2.0` -lpthread"
9 if [ -e /usr/lib/libdl.so ]; then
12 if [ -z "$LIBPATH" -o "${LIBPATH%%/*}" ]; then
13 LIBPATH=`pwd`/${LIBPATH:-..}
22 for i in $REQUIRED; do
23 path=`ls -1d $LIBPATH/*$i* 2>/dev/null | head -n1`
24 if [ -z "$path" -o ! -d "$path/source" ]; then
25 missing="$missing msp$i"
27 if [ $i = "core" ]; then
28 ln -sf $path/source/* include/msp/
30 ln -sf $path/source include/msp/$i
32 sources="$sources `find $path/source -name '*.cpp'`"
36 if [ ! -z "$missing" ]; then
37 echo "The following libraries were not found:$missing"
38 echo "I looked for them in $LIBPATH"
39 echo "If they are somewhere else, please adjust the LIBPATH environment variable."
43 echo "Compiling builder-stage1. This may take several minutes."
44 g++ $sources -o builder-stage1 $CFLAGS $LIBS
45 echo "Using builder-stage1 to compile builder."