From 99ee6914a5fee4b91678147e66d6cac60923b66d Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Tue, 3 Apr 2012 10:49:06 -0400 Subject: [PATCH] Fix and test paths on Arduino in both Linux and OS X. --- arduino-mk/Arduino.mk | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 4f8b3bd..7fe264b 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -187,12 +187,28 @@ OSTYPE := $(shell uname) ifneq (ARDUINO_DIR,) -ifndef AVR_TOOLS_PATH -AVR_TOOLS_PATH = $(ARDUINO_DIR)/hardware/tools +ifndef TOOLS_PATH +TOOLS_PATH = $(ARDUINO_DIR)/hardware/tools/ endif -ifndef ARDUINO_ETC_PATH -ARDUINO_ETC_PATH = $(ARDUINO_DIR)/hardware/tools/avr/etc +ifndef AVR_TOOLS_PATH +AVR_TOOLS_PATH = $(TOOLS_PATH)/avr/bin/ +endif + +ifndef AVRDUDE_TOOLS_PATH +ifeq ($(OSTYPE),Linux) +AVRDUDE_TOOLS_PATH = $(TOOLS_PATH) +else +AVRDUDE_TOOLS_PATH = $(TOOLS_PATH)/avr/bin +endif +endif + +ifndef AVRDUDE_ETC_PATH +ifeq ($(OSTYPE),Linux) +AVRDUDE_ETC_PATH = $(TOOLS_PATH) +else +AVRDUDE_ETC_PATH = $(TOOLS_PATH)/avr/etc +endif endif ifndef AVRDUDE_CONF