X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=build%2Fcompiler_flags;h=b17dac3db9ea7444a3215a19e0b1dc50671ac13e;hb=9330c75f9ad159f7695e0e890e0ec07f3b12b260;hp=59fcb18a27c8b08c7cb5ffc2c2605b7fd4589166;hpb=28b8b4234e395c3fdc4800e5cfb3dcd70a15cadf;p=plomrogue
diff --git a/build/compiler_flags b/build/compiler_flags
index 59fcb18..b17dac3 100644
--- a/build/compiler_flags
+++ b/build/compiler_flags
@@ -2,4 +2,12 @@
# or any later version. For details on its copyright, license, and warranties,
# see the file NOTICE in the root directory of the PlomRogue source package.
-CFLAGS='-std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security -g'
+OFLAG='-O3'
+CFLAGS="-std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security $OFLAG"
+
+# For non-GNU gcc masks, drop all gcc-specific debugging flags.
+test=`stat --version 2>&1 | grep 'Free Software Foundation' | wc -l`
+if [ 1 -gt $test ]
+then
+ CFLAGS=$OFLAG
+fi