From c0234eaeb6993bdc5d31256401af7b65c2690d9e Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 2 Apr 2017 11:34:06 -0400 Subject: [PATCH] preparing to live a new life --- firmware/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/firmware/Makefile b/firmware/Makefile index d4815b67b1..d17d78f9b3 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -8,12 +8,15 @@ PROJECT_DIR = . # by default EXTRA_PARAMS is empty and we create 'debug' version of the firmware with additional assertions and statistics # for 'release' options see 'clean_compile_two_versions.bat' file +ifeq ($(DEBUG_LEVEL_OPT),) + # this value would be used by default. For 'release' configuration override with '-O2' or something along these lines + DEBUG_LEVEL_OPT = -O0 -ggdb -g3 +endif + # Compiler options here. ifeq ($(USE_OPT),) -# USE_OPT = -O2 -ggdb -std=gnu99 -fomit-frame-pointer -falign-functions=16 -# USE_OPT = $(RFLAGS) -O1 -fgnu89-inline -ggdb -fomit-frame-pointer -falign-functions=16 -std=gnu99 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers - USE_OPT = $(EXTRA_PARAMS) $(RFLAGS) -O2 -fomit-frame-pointer -falign-functions=16 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes + USE_OPT = $(EXTRA_PARAMS) $(DEBUG_LEVEL_OPT) $(RFLAGS) -fomit-frame-pointer -falign-functions=16 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes endif # C specific options here (added to USE_OPT).