diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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 " |
