Add a VERSION define

pull/18/head
Jesse Vincent 10 years ago
parent f5ce233b8b
commit 87b73606f1

@ -6,8 +6,10 @@ PORT = /dev/cu.usbmodem1421
ARDUINO_LIBS =
#ARDUINO_CORE_PATH = hardware/keyboardio/cores/keyboardio
#ALTERNATE_CORE = keyboardio
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always)
include _Makefile.Master
astyle:
astyle --style=linux ArduinoKeyboard.ino *.h

@ -352,6 +352,13 @@ ifdef EXT_C_FLAGS
endif
# Add extracted variable to compiler flags.
#
ifdef GIT_VERSION
EXTRA_FLAGS += -DVERSION=\"$(GIT_VERSION)\"
endif
ifdef BUILD_BOARD
EXTRA_FLAGS += -DARDUINO_$(BUILD_BOARD)
endif

Loading…
Cancel
Save