Compile with debugging symbols only when DEBUG=1.
This commit is contained in:
parent
8a2e251e95
commit
10d427f2e9
1 changed files with 8 additions and 2 deletions
|
@ -755,8 +755,14 @@ endif
|
|||
# Using += instead of =, so that CPPFLAGS can be set per sketch level
|
||||
CPPFLAGS += -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \
|
||||
-I. -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \
|
||||
$(SYS_INCLUDES) $(USER_INCLUDES) -g -O$(OPTIMIZATION_LEVEL) -Wall \
|
||||
-ffunction-sections -fdata-sections
|
||||
$(SYS_INCLUDES) $(USER_INCLUDES) -Wall -ffunction-sections \
|
||||
-fdata-sections
|
||||
|
||||
ifdef DEBUG
|
||||
CPPFLAGS += -O0 -g
|
||||
else
|
||||
CPPFLAGS += -O$(OPTIMIZATION_LEVEL)
|
||||
endif
|
||||
|
||||
# USB IDs for the Leonardo
|
||||
ifeq ($(VARIANT),leonardo)
|
||||
|
|
Loading…
Reference in a new issue