From b0ace5b2a22f066313fd50cb9ebf3eb123077219 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 2 Apr 2012 10:10:48 -0400 Subject: [PATCH] Allow overriding of AVR tool names. --- arduino-mk/Arduino.mk | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 2d39095..dd2e6c6 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -308,13 +308,41 @@ CORE_LIB = $(OBJDIR)/libcore.a DEP_FILE = $(OBJDIR)/depends.mk # Names of executables -CC = $(AVR_TOOLS_PATH)/avr-gcc -CXX = $(AVR_TOOLS_PATH)/avr-g++ -OBJCOPY = $(AVR_TOOLS_PATH)/avr-objcopy -OBJDUMP = $(AVR_TOOLS_PATH)/avr-objdump -AR = $(AVR_TOOLS_PATH)/avr-ar -SIZE = $(AVR_TOOLS_PATH)/avr-size -NM = $(AVR_TOOLS_PATH)/avr-nm +ifndef CC_NAME +CC_NAME = avr-gcc +endif + +ifndef CXX_NAME +CXX_NAME = avr-g++ +endif + +ifndef OBJCOPY_NAME +OBJCOPY_NAME = avr-objcopy +endif + +ifndef OBJDUMP_NAME +OBJDUMP_NAME = avr-objdump +endif + +ifndef AR_NAME +AR_NAME = avr-ar +endif + +ifndef SIZE_NAME +SIZE_NAME = avr-size +endif + +ifndef NM_NAME +NM_NAME = avr-nm +endif + +CC = $(AVR_TOOLS_PATH)/$(CC_NAME) +CXX = $(AVR_TOOLS_PATH)/$(CXX_NAME) +OBJCOPY = $(AVR_TOOLS_PATH)/$(OBJCOPY_NAME) +OBJDUMP = $(AVR_TOOLS_PATH)/$(OBJDUMP_NAME) +AR = $(AVR_TOOLS_PATH)/$(AR_NAME) +SIZE = $(AVR_TOOLS_PATH)/$(SIZE_NAME) +NM = $(AVR_TOOLS_PATH)/$(NM_NAME) REMOVE = rm -f MV = mv -f CAT = cat