Saxum/build.sh

37 lines
549 B
Bash
Raw Normal View History

2014-10-24 10:02:24 +00:00
#!/bin/bash
2014-11-05 11:46:36 +00:00
if [[ $1 == "clean" ]]
then
rm -rf build
rm -rf binaries
rm -rf extern/bullet/build
exit
fi
cmake="cmake"
if [[ $1 == "windows" ]]
then
cmake=x86_64-w64-mingw32-cmake
fi
currentDir=$(pwd)
threads=$(($(nproc)+1))
2014-10-24 10:02:24 +00:00
#building bullet
cd extern/bullet/
mkdir -p build
cd build
$cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 ..
make -j$threads
2014-10-24 10:02:24 +00:00
cd $currentDir
#Building app
mkdir -p build
cd build
$cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 ..
make -j$threads