Add DEBUG and NDEBUG preprocessor defines
This commit is contained in:
parent
3109678551
commit
51bd0c5621
@ -168,8 +168,11 @@ CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-
|
|||||||
CXXFLAGS = $(MCU) $(CXX_DEFS) $(CXX_INCLUDES) $(OPT) -Wall -Wextra -pedantic -std=c++17 -fdata-sections -ffunction-sections
|
CXXFLAGS = $(MCU) $(CXX_DEFS) $(CXX_INCLUDES) $(OPT) -Wall -Wextra -pedantic -std=c++17 -fdata-sections -ffunction-sections
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
CFLAGS += -g -gdwarf-2
|
CFLAGS += -g -gdwarf-2 -DDEBUG
|
||||||
CXXFLAGS += -g -gdwarf-2
|
CXXFLAGS += -g -gdwarf-2 -DDEBUG
|
||||||
|
else
|
||||||
|
CFLAGS += -DNDEBUG
|
||||||
|
CXXFLAGS += -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user