summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index a8b26e8..abb6d4f 100755
--- a/build.sh
+++ b/build.sh
@@ -1,9 +1,16 @@
#!/bin/bash
+# Use project-local GCC if available, otherwise system GCC
+TOOLCHAIN_GCC="./toolchain/gcc-15.2.0/bin/gcc"
+if [ -f "${TOOLCHAIN_GCC}" ]; then
+ CC="${TOOLCHAIN_GCC}"
+else
+ CC=gcc
+fi
+
# Set the project name here
PROJECT_NAME="mknes" # Change this for each new project
-CC=gcc
WIN_CC=x86_64-w64-mingw32-gcc
# Base configuration common to all builds
@@ -52,8 +59,7 @@ case "$BUILD_TYPE" in
# -pg # for gprof
;;
"release")
- # CFLAGS+="-s -Wl,--strip-all -O2 "
- CFLAGS+=" -O2 "
+ CFLAGS+="-s -Wl,--strip-all -O2 "
;;
"profile")
CFLAGS+="-O2 -fprofile-generate -ftest-coverage -DBENCHMARK "