aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Dunlap <dunlapadam@gmail.com>2012-06-10 15:06:08 -0700
committerAdam Dunlap <dunlapadam@gmail.com>2012-06-10 15:06:08 -0700
commit4a81c19a8beaf8c2b20b3b7d7f1ba78da8b5ecb9 (patch)
tree47c742d0a03e93cad7dc773a23d276518c142920
parent1e5d7c1a33955e70275f8f7e828498c98995590e (diff)
Changed AVRDUDE_CONF so it can be defined in per-project makefile
-rw-r--r--arduino-mk/Arduino.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index a091b2b..0ea464b 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -285,8 +285,6 @@ ifdef ARDUINO_DIR
ifndef AVR_TOOLS_DIR
AVR_TOOLS_DIR = $(ARDUINO_DIR)/hardware/tools/avr
-# The avrdude bundled with Arduino can't find it's config
-AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf
endif
ifndef AVR_TOOLS_PATH
@@ -612,6 +610,14 @@ ifndef AVRDUDE
AVRDUDE = $(AVR_TOOLS_PATH)/avrdude
endif
+ifndef AVRDUDE_CONF
+ifndef AVR_TOOLS_DIR
+# The avrdude bundled with Arduino can't find its config
+AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf
+endif
+# If avrdude is installed separately, it can find its own config flie
+endif
+
AVRDUDE_COM_OPTS = -q -V -p $(MCU)
ifdef AVRDUDE_CONF
AVRDUDE_COM_OPTS += -C $(AVRDUDE_CONF)