diff --git a/build.sh b/build.sh index b75ab7a..7deeb39 100755 --- a/build.sh +++ b/build.sh @@ -9,6 +9,8 @@ fi script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) build="$1" +mkdir -p $build + if [ -x "$(command -v g++)" ]; then cpp_compiler="g++"; c_compiler="gcc"; elif [ -x "$(command -v clang++)" ]; then cpp_compiler="clang++"; c_compiler="clang"; else echo "Unable to find c++ cpp_compiler"; exit -1; fi; @@ -18,6 +20,9 @@ elif [ -x "$(command -v lld)" ]; then linker_cmd="-fuse-ld=lld"; elif [ -x "$(command -v ld)" ]; then linker_cmd="-fuse-ld=ld"; else echo "Unable to find c/c++ linker"; exit -1; fi; +# COMPILER FLAGS +out="-o" + # STB_IMAGE src="${script_dir}/external/stb/stb.c" flags="-std=c99 -Wno-everything -Iexternal/stb -c -static"