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:-..}
21 for i in $REQUIRED; do
22 path=`ls -1d $LIBPATH/*$i* 2>/dev/null | head -n1`
23 if [ -z "$path" ]; then
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'`"
35 echo "Compiling builder-stage1. This may take several minutes."
36 g++ $sources -o builder-stage1 $CFLAGS $LIBS