diff options
| author | Simon John <git@the-jedi.co.uk> | 2016-07-25 13:13:02 +0100 |
|---|---|---|
| committer | Simon John <git@the-jedi.co.uk> | 2016-07-25 13:13:02 +0100 |
| commit | e4b30603d8c846f9b108358c30d564887bfd1878 (patch) | |
| tree | 12953b891027613370fa9a231eda454b43d06120 /Arduino.mk | |
| parent | 77431bf2504eaf8cb36ac671ee40ca06c07484fd (diff) | |
Added -std=gnu++11 -fno-threadsafe-statics to CXXFLAGS_STD if we're using Arduino 1.6 to match
upstream (without it compilation seems to fail on OSX). Updated docs.
Also made ARDUINO_LIB_PATH overloadable (as implied by arduino-mk-vars.md) although this is a
pretty niche use-case.
Diffstat (limited to 'Arduino.mk')
| -rw-r--r-- | Arduino.mk | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -472,8 +472,12 @@ ifndef AVR_TOOLS_PATH AVR_TOOLS_PATH = $(AVR_TOOLS_DIR)/bin endif -ARDUINO_LIB_PATH = $(ARDUINO_DIR)/libraries -$(call show_config_variable,ARDUINO_LIB_PATH,[COMPUTED],(from ARDUINO_DIR)) +ifndef ARDUINO_LIB_PATH + ARDUINO_LIB_PATH = $(ARDUINO_DIR)/libraries + $(call show_config_variable,ARDUINO_LIB_PATH,[COMPUTED],(from ARDUINO_DIR)) +else + $(call show_config_variable,ARDUINO_LIB_PATH,[USER]) +endif # 1.5.x platform dependent libs path ifndef ARDUINO_PLATFORM_LIB_PATH @@ -1035,7 +1039,11 @@ else endif ifndef CXXFLAGS_STD - CXXFLAGS_STD = + ifeq ($(shell expr $(ARDUINO_VERSION) '>' 150), 1) + CXXFLAGS_STD = -std=gnu++11 -fno-threadsafe-statics + else + CXXFLAGS_STD = + endif $(call show_config_variable,CXXFLAGS_STD,[DEFAULT]) else $(call show_config_variable,CXXFLAGS_STD,[USER]) |
