From af52a2dcc8c0119eca135cf1c5f66276a8efd5d5 Mon Sep 17 00:00:00 2001 From: Sudar Date: Sat, 9 Jun 2012 10:59:02 +0530 Subject: [PATCH] Replaced = with += in CPPFLAGS assignment so that we can set CPPFLAGS per sketch if needed --- arduino-mk/Arduino.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 70637ca..315492f 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -494,7 +494,8 @@ LIB_OBJS = $(patsubst $(ARDUINO_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(LIB_C_SR USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(USER_LIB_CPP_SRCS)) \ $(patsubst $(USER_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(USER_LIB_C_SRCS)) -CPPFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \ +# 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 -Os -w -Wall \ -ffunction-sections -fdata-sections