diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 2d39095..cb36048 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -173,6 +173,9 @@ endif ######################################################################## +# The path directory this Makefile is stored in +ARDUINO_MK_PATH := $(dir $(lastword $(MAKEFILE_LIST))) + # # Arduino version number ifndef ARDUINO_VERSION @@ -214,8 +217,16 @@ ifndef BOARDS_TXT BOARDS_TXT = $(ARDUINO_DIR)/hardware/arduino/boards.txt endif +ifndef PARSE_BOARD_OPTS +PARSE_BOARD_OPTS = --boards_txt=$(BOARDS_TXT) +endif + +ifndef PARSE_BOARD_PATH +PARSE_BOARD_PATH = $(ARDUINO_MK_PATH)/ard-parse-boards +endif + ifndef PARSE_BOARD -PARSE_BOARD = ard-parse-boards --boards_txt=$(BOARDS_TXT) +PARSE_BOARD = $(PARSE_BOARD_PATH) $(PARSE_BOARD_OPTS) endif # Which variant ? This affects the include path diff --git a/examples/Blink/Makefile b/examples/Blink/Makefile index 12cd3e6..3f9d938 100644 --- a/examples/Blink/Makefile +++ b/examples/Blink/Makefile @@ -1,5 +1,4 @@ ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java -PARSE_BOARD = ../../arduino-mk/ard-parse-boards BOARD_TAG = uno ARDUINO_PORT = /dev/cu.usb* diff --git a/examples/BlinkWithoutDelay/Makefile b/examples/BlinkWithoutDelay/Makefile index 5c8c1dd..e84232c 100644 --- a/examples/BlinkWithoutDelay/Makefile +++ b/examples/BlinkWithoutDelay/Makefile @@ -1,9 +1,8 @@ ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java -PARSE_BOARD = ../../arduino-mk/ard-parse-boards BOARD_TAG = uno ARDUINO_PORT = /dev/cu.usb* ARDUINO_LIBS = -include ../../arduino-mk/Arduino.mk \ No newline at end of file +include ../../arduino-mk/Arduino.mk diff --git a/examples/Fade/Makefile b/examples/Fade/Makefile index 5c8c1dd..e84232c 100644 --- a/examples/Fade/Makefile +++ b/examples/Fade/Makefile @@ -1,9 +1,8 @@ ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java -PARSE_BOARD = ../../arduino-mk/ard-parse-boards BOARD_TAG = uno ARDUINO_PORT = /dev/cu.usb* ARDUINO_LIBS = -include ../../arduino-mk/Arduino.mk \ No newline at end of file +include ../../arduino-mk/Arduino.mk diff --git a/examples/HelloWorld/Makefile b/examples/HelloWorld/Makefile index 591d575..c6b5108 100644 --- a/examples/HelloWorld/Makefile +++ b/examples/HelloWorld/Makefile @@ -1,9 +1,6 @@ -ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java -PARSE_BOARD = ../../arduino-mk/ard-parse-boards - BOARD_TAG = uno ARDUINO_PORT = /dev/cu.usb* ARDUINO_LIBS = LiquidCrystal -include ../../arduino-mk/Arduino.mk \ No newline at end of file +include ../../arduino-mk/Arduino.mk diff --git a/examples/WebServer/Makefile b/examples/WebServer/Makefile index 56e422f..a7ca436 100644 --- a/examples/WebServer/Makefile +++ b/examples/WebServer/Makefile @@ -1,9 +1,8 @@ ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java -PARSE_BOARD = ../../arduino-mk/ard-parse-boards BOARD_TAG = uno ARDUINO_PORT = /dev/cu.usb* ARDUINO_LIBS = Ethernet Ethernet/utility SPI -include ../../arduino-mk/Arduino.mk \ No newline at end of file +include ../../arduino-mk/Arduino.mk diff --git a/examples/master_reader/Makefile b/examples/master_reader/Makefile index 7e744c1..e0fcdaf 100644 --- a/examples/master_reader/Makefile +++ b/examples/master_reader/Makefile @@ -1,5 +1,4 @@ ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java -PARSE_BOARD = ../../arduino-mk/ard-parse-boards BOARD_TAG = uno ARDUINO_PORT = /dev/cu.usb* diff --git a/examples/toneMelody/Makefile b/examples/toneMelody/Makefile index 17d67e8..e84232c 100644 --- a/examples/toneMelody/Makefile +++ b/examples/toneMelody/Makefile @@ -1,5 +1,4 @@ ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java -PARSE_BOARD = ../../arduino-mk/ard-parse-boards BOARD_TAG = uno ARDUINO_PORT = /dev/cu.usb*