mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-14 00:37:21 +00:00
aa20a78b0e
* Add bootloader versioning * Move some logic to api-hal-version * Backport to f4 * Dolphin: update version screen layout, make it more readable Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
9 lines
572 B
Makefile
9 lines
572 B
Makefile
GIT_COMMIT = $(shell git describe --always --exclude '*' || echo 'unknown')
|
|
GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD || echo 'unknown')
|
|
GIT_BRANCH_NUM = $(shell git rev-list --count $(GIT_BRANCH) || echo 'nan')
|
|
BUILD_DATE = $(shell date '+%d-%m-%Y' || echo 'unknown')
|
|
VERSION = $(shell git describe --tags --abbrev=0 || echo 'unknown')
|
|
|
|
CFLAGS += -DGIT_COMMIT="\"$(GIT_COMMIT)\"" -DGIT_BRANCH="\"$(GIT_BRANCH)\"" -DGIT_BRANCH_NUM="\"$(GIT_BRANCH_NUM)\""
|
|
CFLAGS += -DBUILD_DATE="\"$(BUILD_DATE)\"" -DTARGET="\"$(TARGET)\"" -DVERSION="\"$(VERSION)\""
|
|
|