/make/arduino-mk

To get this branch, use:
bzr branch http://bzr.ed.am/make/arduino-mk

« back to all changes in this revision

Viewing changes to arduino.mk

  • Committer: edam
  • Date: 2012-12-16 18:43:33 UTC
  • Revision ID: tim@ed.am-20121216184333-f03y3fdjot8024ph
fixed resetting Leonardos before upload

Show diffs side-by-side

added added

removed removed

159
159
$(error ARDUINODIR is not set correctly; arduino software not found)
160
160
endif
161
161
 
162
 
# obtain preferences from the IDE's preferences.txt
163
 
PREFERENCES_FILE := $(wildcard $(HOME)/.arduino/preferences.txt)
164
 
ifneq "$(PREFERENCES_FILE)" ""
165
 
SKETCHBOOKDIR := \
166
 
        $(shell sed -ne "s/sketchbook.path=\(.*\)/\1/p" $(PREFERENCES_FILE))
167
 
endif
168
 
 
169
162
# default arduino version
170
163
ARDUINOCONST ?= 100
171
164
 
172
165
# default path for avr tools
173
 
AVRTOOLSPATH ?= $(subst :, , $(PATH)) $(ARDUINODIR)/hardware/tools \
174
 
        $(ARDUINODIR)/hardware/tools/avr/bin
 
166
ifndef AVRTOOLSPATH
 
167
AVRTOOLSPATH := $(subst :, , $(PATH))
 
168
AVRTOOLSPATH += $(ARDUINODIR)/hardware/tools
 
169
AVRTOOLSPATH += $(ARDUINODIR)/hardware/tools/avr/bin
 
170
endif
175
171
 
176
172
# default path to find libraries
177
 
LIBRARYPATH ?= libraries libs $(SKETCHBOOKDIR)/libraries $(ARDUINODIR)/libraries
 
173
LIBRARYPATH ?= libraries libs $(ARDUINODIR)/libraries
178
174
 
179
175
# auto mode?
180
176
INOFILE := $(wildcard *.ino *.pde)