Arduino.mk: fixes to obey HAL_BOARD in user's config.mk

This commit is contained in:
Pat Hickey 2012-12-18 13:43:32 -08:00 committed by Andrew Tridgell
parent ba733dcc3e
commit 23d6c79313

View File

@ -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-%: