]> git.tdb.fi Git - builder.git/blob - bootstrap.sh
Added io to the required libs in bootstrap.sh
[builder.git] / bootstrap.sh
1 #!/bin/sh
2 # $Id$
3
4 REQUIRED="core datafile path strings io"
5 CFLAGS="-Iinclude `pkg-config --cflags sigc++-2.0`"
6 LIBS="`pkg-config --libs sigc++-2.0` -lpthread -ldl"
7 if [ -z "$LIBPATH" ]; then
8         LIBPATH=`pwd`/..
9 fi
10
11 LIBPATH=`readlink -f $LIBPATH`
12
13 mkdir -p include/msp
14
15 sources=source/*.cpp
16
17 for i in $REQUIRED; do
18         path=$LIBPATH/$i
19         if [ ! -e $path ]; then
20                 echo $i missing
21                 exit 1
22         fi
23         if [ $i = "core" ]; then
24                 ln -sfT $path/source/core include/msp/core
25                 ln -sfT $path/source/time include/msp/time
26         elif [ $i = "misc" ]; then
27                 ln -sf $path/source/*.h include/msp
28         else
29                 ln -sfT $path/source include/msp/$i
30         fi
31         sources="$sources `find $path/source -name '*.cpp'`"
32 done
33
34 g++ $sources -o builder-stage1 $CFLAGS $LIBS