diff options
| author | Simon John <git@the-jedi.co.uk> | 2018-02-24 16:06:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-24 16:06:09 +0000 |
| commit | a7b8084ac6b9b4d94dd91b9b996243432a7de4b3 (patch) | |
| tree | cff8ea8bb5e6f63d7ada4eb85ad67a9b5237525a /Arduino.mk | |
| parent | c10eaa4f480da35437d13fdc21df5d13e2d11866 (diff) | |
| parent | 139b5dbc4919e118b0e18783fae8e51a2dbc258c (diff) | |
Merge pull request #546 from kierdavis/disable-prog-types-compat
Allow compatibility with old pgmspace API to be disabled by the user
Diffstat (limited to 'Arduino.mk')
| -rw-r--r-- | Arduino.mk | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1047,11 +1047,17 @@ else 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) $(ARDUINO_ARCH_FLAG) -D__PROG_TYPES_COMPAT__ \ +CPPFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) $(ARDUINO_ARCH_FLAG) \ -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \ $(SYS_INCLUDES) $(PLATFORM_INCLUDES) $(USER_INCLUDES) -Wall -ffunction-sections \ -fdata-sections +# PROG_TYPES_COMPAT is enabled by default for compatibility with the Arduino IDE. +# By placing it before the user-provided CPPFLAGS rather than after, we allow the +# the user to disable it if they like, by adding the negation of the flag +# (-U__PROG_TYPES_COMPAT__) to the user-provided CPPFLAGS. +CPPFLAGS := -D__PROG_TYPES_COMPAT__ $(CPPFLAGS) + ifdef DEBUG OPTIMIZATION_FLAGS= $(DEBUG_FLAGS) else |
