diff --git a/sc2/build/unix/build.config b/sc2/build/unix/build.config index 52f11ebc9..43db75c16 100644 --- a/sc2/build/unix/build.config +++ b/sc2/build/unix/build.config @@ -100,14 +100,34 @@ uqm_prepare_config() CHOICE_debug_OPTION_nodebug_TITLE="Optimised release build" CHOICE_debug_OPTION_nodebug_ACTION='nodebug_action' nodebug_action() { - CFLAGS="$CFLAGS -O3" + case "$HOST_SYSTEM" in + WINSCW) + CFLAGS="$CFLAGS -O2 -d NDEBUG" + ;; + ARMV5) + CFLAGS="$CFLAGS -O3 -Otime -DNDEBUG" + ;; + *) + CFLAGS="$CFLAGS -O3" + ;; + esac DEBUG=0 } CHOICE_debug_OPTION_debug_TITLE="Debugging build" CHOICE_debug_OPTION_debug_ACTION='debug_action' debug_action() { - CFLAGS="$CFLAGS -g -O0 -W -Wall -DDEBUG" - LDFLAGS="$LDFLAGS -O0" + case "$HOST_SYSTEM" in + WINSCW) + CFLAGS="$CFLAGS -g -O0 -W all -d DEBUG -d _DEBUG" + ;; + ARMV5) + CFLAGS="$CFLAGS -g -O0 -DDEBUG -D_DEBUG" + ;; + *) + CFLAGS="$CFLAGS -g -O0 -W -Wall -DDEBUG" + LDFLAGS="$LDFLAGS -O0" + ;; + esac DEBUG=1 } CHOICE_debug_OPTION_strictdebug_TITLE="Debug + strict compile checks"