Compile with debugging symbols only when DEBUG=1.

Fix #101
This commit is contained in:
Christopher Peplin 2013-07-02 18:07:23 -04:00 committed by Sudar
parent 87e29ea806
commit 1bc31c814b
2 changed files with 9 additions and 2 deletions

View file

@ -15,6 +15,7 @@ The following is the rough list of changes that went into different versions. I
- Remove dependency on wait-connection-leonardo shell script. Fix issue #95
- Add support for the Digilent chipKIT platform. (https://github.com/peplin)
- Implement ard-parse-boards with shell scripting instead of Perl (https://github.com/peplin)
- Compile with debugging symbols only when DEBUG=1 (https://github.com/peplin)
### 0.12.0 (2013-06-20)
- Fix "generated_assembly" target, which got broken earlier. Fix issue #76 (https://github.com/matthijskooijman)

View file

@ -764,8 +764,14 @@ endif
# Using += instead of =, so that CPPFLAGS can be set per sketch level
CPPFLAGS += -$(MCU_FLAG_NAME)=$(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)