2020-11-06 09:31:06 +00:00
|
|
|
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')
|
2021-04-19 16:30:25 +00:00
|
|
|
VERSION = $(shell git describe --tags --abbrev=0 || echo 'unknown')
|
2020-11-06 09:31:06 +00:00
|
|
|
|
|
|
|
CFLAGS += -DGIT_COMMIT="\"$(GIT_COMMIT)\"" -DGIT_BRANCH="\"$(GIT_BRANCH)\"" -DGIT_BRANCH_NUM="\"$(GIT_BRANCH_NUM)\""
|
2021-04-19 16:30:25 +00:00
|
|
|
CFLAGS += -DBUILD_DATE="\"$(BUILD_DATE)\"" -DTARGET="\"$(TARGET)\"" -DVERSION="\"$(VERSION)\""
|
|
|
|
|