diff --git a/build.sh b/build.sh index 52967e3..af65997 100755 --- a/build.sh +++ b/build.sh @@ -8,13 +8,14 @@ if [ -z "$CXXFLAGS" ]; then fi CXX_WITH_FLAGS="$CXX $CXXFLAGS" -# `.cpp` files in src/lib will be automatically picked up and compiled into dynamic libraries. +# `.cpp` files in src/lib will be automatically picked up and compiled into +# dynamically linked libraries. echo "Building libs..." mkdir -pv bin/lib for lib in $(find ./src/lib -name "*.cpp"); do COMPILE_COMMAND="$CXX_WITH_FLAGS -shared -o $(sed -e 's/^.\/src/.\/bin/;s/cpp$/so/' <<< $lib) $lib" echo $COMPILE_COMMAND - $COMPILE_COMMAND + $COMPILE_COMMAND & done @@ -35,6 +36,6 @@ mkdir -pv bin/tools # add compile commands to this variable COMPILE_COMMANDS=" set -v -$CXX_WITH_FLAGS src/tools/dumpnbt.cpp -Lbin/lib -lnbt -o bin/tools/dumpnbt +$CXX_WITH_FLAGS src/tools/dumpnbt.cpp -Lbin/lib -lnbt -o bin/tools/dumpnbt & " sh <<< $COMPILE_COMMANDS