/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: Tim Marston
  • Date: 2013-02-20 21:23:08 UTC
  • Revision ID: tim@ed.am-20130220212308-l0e8dprou7nxaed0
fixed default ARDUINODIR and PREFERENCESFILE locations for Macs

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
 
156
156
# default arduino software directory, check software exists
157
157
ifndef ARDUINODIR
158
 
ARDUINODIR := $(firstword $(wildcard ~/opt/arduino /usr/share/arduino))
 
158
ARDUINODIR := $(firstword $(wildcard ~/opt/arduino /usr/share/arduino \
 
159
        /Applications/Arduino.app/Contents/Resources/Java \
 
160
        $(HOME)/Applications/Arduino.app/Contents/Resources/Java))
159
161
endif
160
162
ifeq "$(wildcard $(ARDUINODIR)/hardware/arduino/boards.txt)" ""
161
163
$(error ARDUINODIR is not set correctly; arduino software not found)
207
209
BOARD_BOOTLOADER_FILE := $(call readboardsparam,bootloader.file)
208
210
 
209
211
# obtain preferences from the IDE's preferences.txt
210
 
PREFERENCESFILE := $(wildcard $(HOME)/.arduino/preferences.txt)
 
212
PREFERENCESFILE := $(firstword $(wildcard \
 
213
        $(HOME)/.arduino/preferences.txt $(HOME)/Library/Arduino/preferences.txt))
211
214
ifneq "$(PREFERENCESFILE)" ""
212
215
readpreferencesparam = $(shell sed -ne "s/$(1)=\(.*\)/\1/p" $(PREFERENCESFILE))
213
216
SKETCHBOOKDIR := $(call readpreferencesparam,sketchbook.path)