Merge pull request #1 from WizenedEE/master

Add more flexibility and make echo work on linux and changed AVRDUDE_CONF so that it can be defined in per-project makefile.
This commit is contained in:
Sudar 2012-06-10 22:24:31 -07:00
commit 8140557eb2

View file

@ -285,8 +285,6 @@ ifdef ARDUINO_DIR
ifndef AVR_TOOLS_DIR ifndef AVR_TOOLS_DIR
AVR_TOOLS_DIR = $(ARDUINO_DIR)/hardware/tools/avr 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 endif
ifndef AVR_TOOLS_PATH ifndef AVR_TOOLS_PATH
@ -478,7 +476,7 @@ NM = $(AVR_TOOLS_PATH)/avr-nm
REMOVE = rm -f REMOVE = rm -f
MV = mv -f MV = mv -f
CAT = cat CAT = cat
ECHO = echo ECHO = echo -e
# General arguments # General arguments
SYS_LIBS = $(patsubst %,$(ARDUINO_LIB_PATH)/%,$(ARDUINO_LIBS)) SYS_LIBS = $(patsubst %,$(ARDUINO_LIB_PATH)/%,$(ARDUINO_LIBS))
@ -612,6 +610,14 @@ ifndef AVRDUDE
AVRDUDE = $(AVR_TOOLS_PATH)/avrdude AVRDUDE = $(AVR_TOOLS_PATH)/avrdude
endif 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) AVRDUDE_COM_OPTS = -q -V -p $(MCU)
ifdef AVRDUDE_CONF ifdef AVRDUDE_CONF
AVRDUDE_COM_OPTS += -C $(AVRDUDE_CONF) AVRDUDE_COM_OPTS += -C $(AVRDUDE_CONF)