2016-11-23 03:37:28 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-02-26 20:13:06 +00:00
|
|
|
BUILD_MODE="$1"
|
|
|
|
if [ -z "$BUILD_MODE" ]; then
|
|
|
|
BUILD_MODE="-DDEV_BUILD"
|
|
|
|
fi
|
|
|
|
|
2017-06-29 23:37:48 +00:00
|
|
|
chmod 777 detect_os.sh
|
|
|
|
os=$("./detect_os.sh")
|
|
|
|
|
|
|
|
if [[ "$os" == "linux" ]]; then
|
|
|
|
WARNINGS="-Wno-write-strings -Wno-comment "
|
|
|
|
elif [[ "$os" == "mac" ]]; then
|
|
|
|
WARNINGS="-Wno-comment -Wno-logical-op-parentheses -Wno-null-dereference -Wno-switch"
|
|
|
|
fi
|
|
|
|
|
2017-02-26 20:13:06 +00:00
|
|
|
FLAGS="-D_GNU_SOURCE -fPIC -fpermissive $BUILD_MODE"
|
2016-11-23 03:37:28 +00:00
|
|
|
|
2017-01-07 02:59:55 +00:00
|
|
|
g++ $WARNINGS $FLAGS meta/build.cpp -g -o ../build/build
|
2016-11-23 03:37:28 +00:00
|
|
|
../build/build
|
|
|
|
|
|
|
|
|
|
|
|
|