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,)
ifndef AVR_TOOLS_PATH
AVR_TOOLS_PATH = $(ARDUINO_DIR)/hardware/tools/avr/bin
AVR_TOOLS_PATH = $(ARDUINO_DIR)/hardware/tools/avr/bin/
endif
ifndef ARDUINO_ETC_PATH
@ -308,13 +308,26 @@ 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
CC := avr-gcc
CXX := avr-g++
OBJCOPY := avr-objcopy
OBJDUMP := avr-objdump
AR := avr-ar
SIZE := avr-size
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
MV = mv -f
CAT = cat