Autodetect arduino version when possible
This commit is contained in:
parent
9027158e5f
commit
8896b8fcf6
1 changed files with 9 additions and 0 deletions
|
@ -292,8 +292,17 @@ endif
|
||||||
#
|
#
|
||||||
# Arduino version number
|
# Arduino version number
|
||||||
ifndef ARDUINO_VERSION
|
ifndef ARDUINO_VERSION
|
||||||
|
|
||||||
|
# Remove all the decimals, and right-pad with zeros, and finally grab the first 3 bytes.
|
||||||
|
# Works for 1.0 and 1.0.1
|
||||||
|
AUTO_ARDUINO_VERSION := $(shell cat $(ARDUINO_DIR)/lib/version.txt | sed -e 's/[.]//g' -e 's/$$/0000/' | head --bytes=3)
|
||||||
|
ifdef AUTO_ARDUINO_VERSION
|
||||||
|
$(info Using guessed/detected ARDUINO version define $(AUTO_ARDUINO_VERSION))
|
||||||
|
ARDUINO_VERSION = $(AUTO_ARDUINO_VERSION)
|
||||||
|
else
|
||||||
ARDUINO_VERSION = 100
|
ARDUINO_VERSION = 100
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Arduino and system paths
|
# Arduino and system paths
|
||||||
|
|
Loading…
Reference in a new issue