From 23d6c793139d015b3cd14cf87c19957b1e6d6c57 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Tue, 18 Dec 2012 13:43:32 -0800 Subject: [PATCH] Arduino.mk: fixes to obey HAL_BOARD in user's config.mk --- mk/Arduino.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mk/Arduino.mk b/mk/Arduino.mk index a24ba34891..ef29e4ac27 100644 --- a/mk/Arduino.mk +++ b/mk/Arduino.mk @@ -247,11 +247,11 @@ endif # # Tool options # -EXTRAFLAGS ?= DEFINES = -DF_CPU=$(F_CPU) DEFINES += -DARDUINO=$(ARDUINO_VERS) -DEFINES += $(EXTRAFLAGS) DEFINES += -DSKETCH=\"$(SKETCH)\" +DEFINES += $(EXTRAFLAGS) # from user config.mk +DEFINES += -DCONFIG_HAL_BOARD=$(HAL_BOARD) WARNFLAGS = -Wformat -Wall -Wshadow -Wpointer-arith -Wcast-align WARNFLAGS += -Wwrite-strings -Wformat=2 -Wno-reorder DEPFLAGS = -MD -MT $@ @@ -439,8 +439,10 @@ CORELIBOBJS := EXTRAFLAGS += -DEXCLUDECORE endif -ifneq ($(HAL_BOARD),) -EXTRAFLAGS += -DCONFIG_HAL_BOARD=$(HAL_BOARD) +ifeq ($(HAL_BOARD),HAL_BOARD_AVR_SITL) + TOOLCHAIN = NATIVE +else + TOOLCHAIN = AVR endif ################################################################################ @@ -473,8 +475,6 @@ endif # Targets # -default: apm2 - all: $(SKETCHELF) $(SKETCHEEP) $(SKETCHHEX) print-%: