/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-17 13:29:17 UTC
  • Revision ID: tim@ed.am-20121217132917-o69n7upetk4ggg9x
added support for the user's sketchbook libraries directory

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
 
162
169
# default arduino version
163
170
ARDUINOCONST ?= 100
164
171
 
165
172
# default path for avr tools
166
 
ifndef AVRTOOLSPATH
167
 
AVRTOOLSPATH := $(subst :, , $(PATH))
168
 
AVRTOOLSPATH += $(ARDUINODIR)/hardware/tools
169
 
AVRTOOLSPATH += $(ARDUINODIR)/hardware/tools/avr/bin
170
 
endif
 
173
AVRTOOLSPATH ?= $(subst :, , $(PATH)) $(ARDUINODIR)/hardware/tools \
 
174
        $(ARDUINODIR)/hardware/tools/avr/bin
171
175
 
172
176
# default path to find libraries
173
 
LIBRARYPATH ?= libraries libs $(ARDUINODIR)/libraries
 
177
LIBRARYPATH ?= libraries libs $(SKETCHBOOKDIR)/libraries $(ARDUINODIR)/libraries
174
178
 
175
179
# auto mode?
176
180
INOFILE := $(wildcard *.ino *.pde)