]> git.tdb.fi Git - builder.git/blobdiff - bootstrap.sh
Update the bootstrap to work with recent changes
[builder.git] / bootstrap.sh
index b8531257a94a68b134cfadb8b4f31acd2b61406c..b8c8a7aec7177f31890aea154f49cf8a48229439 100755 (executable)
@@ -2,13 +2,11 @@
 
 set -e
 
+SOURCEDIRS="source/lib source/bootstrap plugins/base plugins/gnu"
 INCLUDEDIR=temp/bootstrap/include
 REQUIRED="core datafile"
-CFLAGS="-I$INCLUDEDIR `pkg-config --cflags sigc++-2.0`"
+CFLAGS="-std=c++11 -iquote . -I$INCLUDEDIR `pkg-config --cflags sigc++-2.0`"
 LIBS="`pkg-config --libs sigc++-2.0` -lpthread"
-if pkg-config --exists "sigc++-2.0 >= 2.5.1"; then
-       CFLAGS="$CFLAGS -std=c++11"
-fi
 MACHINE="`uname -m`"
 SYSTEM="`uname -s`"
 if [ "$MACHINE" = "x86_64" ]; then
@@ -75,7 +73,10 @@ fi
 rm -rf "$INCLUDEDIR"
 mkdir -p "$INCLUDEDIR/msp"
 
-sources=source/*.cpp
+sources=`find $SOURCEDIRS -name '*.cpp'`
+
+mkdir -p "$INCLUDEDIR/msp/builder"
+ln -sf "$PWD/source/lib"/*.h "$INCLUDEDIR/msp/builder/"
 
 use_overlays="unix generic"
 missing=""
@@ -152,6 +153,6 @@ if [ "$PREFIX" ]; then
        ARGS="$ARGS --prefix='$PREFIX'"
 fi
 if [ "$CUSTOM_COMPILER" = "yes" ]; then
-       ARGS="$ARGS CXX=$COMPILER"
+       ARGS="$ARGS --compiler=$COMPILER"
 fi
 eval "./builder-stage1 $ARGS"