Use system AVR tools in Linux as they are not distributed with the IDE.

As of Arduino 1.0 the AVR tools are not distributed with the IDE.
This commit is contained in:
Christopher Peplin 2012-03-30 16:13:09 -04:00
parent f437ea63eb
commit ece25aef75

View file

@ -186,7 +186,7 @@ endif
ifneq (ARDUINO_DIR,) ifneq (ARDUINO_DIR,)
ifndef AVR_TOOLS_PATH ifndef AVR_TOOLS_PATH
AVR_TOOLS_PATH = $(ARDUINO_DIR)/hardware/tools/avr/bin AVR_TOOLS_PATH = $(ARDUINO_DIR)/hardware/tools/avr/bin/
endif endif
ifndef ARDUINO_ETC_PATH ifndef ARDUINO_ETC_PATH
@ -308,13 +308,26 @@ CORE_LIB = $(OBJDIR)/libcore.a
DEP_FILE = $(OBJDIR)/depends.mk DEP_FILE = $(OBJDIR)/depends.mk
# Names of executables # Names of executables
CC = $(AVR_TOOLS_PATH)/avr-gcc CC := avr-gcc
CXX = $(AVR_TOOLS_PATH)/avr-g++ CXX := avr-g++
OBJCOPY = $(AVR_TOOLS_PATH)/avr-objcopy OBJCOPY := avr-objcopy
OBJDUMP = $(AVR_TOOLS_PATH)/avr-objdump OBJDUMP := avr-objdump
AR = $(AVR_TOOLS_PATH)/avr-ar AR := avr-ar
SIZE = $(AVR_TOOLS_PATH)/avr-size SIZE := avr-size
NM = $(AVR_TOOLS_PATH)/avr-nm NM := avr-nm
OSTYPE := $(shell uname)
ifneq ($(OSTYPE),Linux)
# Compilers distributed with the IDE in OS X and Windows, but not Linux
CC := $(addprefix $(AVR_TOOLS_PATH),$(CC))
CXX := $(addprefix $(AVR_TOOLS_PATH),$(CXX))
OBJCOPY := $(addprefix $(AVR_TOOLS_PATH),$(OBJCOPY))
OBJDUMP := $(addprefix $(AVR_TOOLS_PATH),$(OBJDUMP))
AR := $(addprefix $(AVR_TOOLS_PATH),$(AR))
SIZE := $(addprefix $(AVR_TOOLS_PATH),$(SIZE))
NM := $(addprefix $(AVR_TOOLS_PATH),$(NM))
endif
REMOVE = rm -f REMOVE = rm -f
MV = mv -f MV = mv -f
CAT = cat CAT = cat