Cleaning up build scripts

master
Allen Webster 2020-02-19 20:24:13 -08:00
parent 2992e62306
commit a093268fc3
2 changed files with 1 additions and 8 deletions

5
bin/build.sh → bin/build-linux.sh Executable file → Normal file
View File

@ -4,6 +4,7 @@
set -e set -e
# Set up directories (mirrors build.bat) # Set up directories (mirrors build.bat)
ME="$(readlink -f "$0")" ME="$(readlink -f "$0")"
LOCATION="$(dirname "$ME")" LOCATION="$(dirname "$ME")"
SRC_ROOT="$(dirname "$LOCATION")" SRC_ROOT="$(dirname "$LOCATION")"
@ -26,11 +27,7 @@ fi
chmod +rx "$BIN_ROOT/detect_os.sh" chmod +rx "$BIN_ROOT/detect_os.sh"
os=$("$BIN_ROOT/detect_os.sh") os=$("$BIN_ROOT/detect_os.sh")
if [[ "$os" == "linux" ]]; then
WARNINGS="-Wno-write-strings -Wno-comment" WARNINGS="-Wno-write-strings -Wno-comment"
elif [[ "$os" == "mac" ]]; then
WARNINGS="-Wno-write-strings -Wno-comment -Wno-logical-op-parentheses -Wno-null-dereference -Wno-switch"
fi
FLAGS="-D_GNU_SOURCE -fPIC -fpermissive $BUILD_MODE" FLAGS="-D_GNU_SOURCE -fPIC -fpermissive $BUILD_MODE"
INCLUDES="-I$SRC_ROOT -I$CUSTOM_ROOT" INCLUDES="-I$SRC_ROOT -I$CUSTOM_ROOT"

View File

@ -27,11 +27,7 @@ fi
chmod +rx "$BIN_ROOT/detect_os.sh" chmod +rx "$BIN_ROOT/detect_os.sh"
os=$("$BIN_ROOT/detect_os.sh") os=$("$BIN_ROOT/detect_os.sh")
if [[ "$os" == "linux" ]]; then
WARNINGS="-Wno-write-strings -Wno-comment"
elif [[ "$os" == "mac" ]]; then
WARNINGS="-Wno-write-strings -Wno-comment -Wno-null-dereference -Wno-logical-op-parentheses -Wno-switch" WARNINGS="-Wno-write-strings -Wno-comment -Wno-null-dereference -Wno-logical-op-parentheses -Wno-switch"
fi
FLAGS="-D_GNU_SOURCE -fPIC -fpermissive $BUILD_MODE" FLAGS="-D_GNU_SOURCE -fPIC -fpermissive $BUILD_MODE"
INCLUDES="-I$SRC_ROOT -I$CUSTOM_ROOT" INCLUDES="-I$SRC_ROOT -I$CUSTOM_ROOT"