diff options
| author | ladislas <ladislas@weareleka.com> | 2014-08-12 18:11:24 +0200 |
|---|---|---|
| committer | ladislas <ladislas@weareleka.com> | 2014-08-12 18:11:24 +0200 |
| commit | a5b84b1722c04e38aeafd70bbfbad0d538bb4979 (patch) | |
| tree | 569154f65400a944bff278703d3ae9cb4fa7d51e | |
| parent | bb7fc9ad3bb7ede31be75299665453b316e091ac (diff) | |
create CPPFLAGS_STD and make both CFLAGS_STD and CPPFLAGS_STD avalaible for CFLAGS and CXXFLAGS
| -rw-r--r-- | Arduino.mk | 11 | ||||
| -rw-r--r-- | HISTORY.md | 1 | ||||
| -rw-r--r-- | arduino-mk-vars.md | 18 |
3 files changed, 28 insertions, 2 deletions
@@ -931,8 +931,15 @@ else $(call show_config_variable,CFLAGS_STD,[USER]) endif -CFLAGS += $(EXTRA_FLAGS) $(EXTRA_CFLAGS) -CXXFLAGS += -fno-exceptions $(EXTRA_FLAGS) $(EXTRA_CXXFLAGS) +ifndef CPPFLAGS_STD + CPPFLAGS_STD = -std=c++0x + $(call show_config_variable,CPPFLAGS_STD,[DEFAULT]) +else + $(call show_config_variable,CPPFLAGS_STD,[USER]) +endif + +CFLAGS += $(CFLAGS_STD) $(EXTRA_FLAGS) $(EXTRA_CFLAGS) +CXXFLAGS += -fno-exceptions $(CPPFLAGS_STD) $(EXTRA_FLAGS) $(EXTRA_CXXFLAGS) ASFLAGS += -x assembler-with-cpp LDFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -Wl,--gc-sections -O$(OPTIMIZATION_LEVEL) $(EXTRA_FLAGS) $(EXTRA_CXXFLAGS) $(EXTRA_LDFLAGS) SIZEFLAGS ?= --mcu=$(MCU) -C @@ -11,6 +11,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Fix: Make avr-g++ use CXXFLAGS instead of CFLAGS. (https://github.com/sej7278) - Add: Add information about overriding system libs (Issue #229). (https://github.com/sej7278) - Add: Add information about reporting bugs to the correct project (Issue #231). (https://github.com/sej7278) +- Fix: Create CPPFLAGS_STD variable and add CFLAGS_STD and CPPFLAGS_STD to CFLAGS and CXXFLAGS (http://github.com/ladislas) ### 1.3.4 (2014-07-12) - Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav) diff --git a/arduino-mk-vars.md b/arduino-mk-vars.md index 28ed27f..c49f4a2 100644 --- a/arduino-mk-vars.md +++ b/arduino-mk-vars.md @@ -798,6 +798,24 @@ Defaults to `-std=gnu99` ---- +### CPPFLAGS_STD + +**Description:** + +Flags to pass to the C compiler. + +Defaults to `-std=c++0x` + +**Example:** + +```Makefile +CPPFLAGS_STD = -std=gnu++14 +``` + +**Requirement:** *Optional* + +---- + ### OVERRIDE_EXECUTABLES **Description:** |
