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:
parent
f437ea63eb
commit
ece25aef75
1 changed files with 21 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue