2021-08-26 20:59:23 +03:00
|
|
|
GIT_COMMIT := $(shell git rev-parse --short HEAD || echo 'unknown')
|
|
|
|
GIT_BRANCH := $(shell echo $${WORKFLOW_BRANCH_OR_TAG-$$(git rev-parse --abbrev-ref HEAD || echo 'unknown')})
|
|
|
|
GIT_BRANCH_NUM := $(shell git rev-list --count HEAD || echo 'nan')
|
|
|
|
BUILD_DATE := $(shell date '+%d-%m-%Y' || echo 'unknown')
|
|
|
|
VERSION := $(shell git describe --tags --abbrev=0 --exact-match || echo 'unknown')
|
2021-04-19 19:30:25 +03:00
|
|
|
|
2021-08-26 20:59:23 +03:00
|
|
|
CFLAGS += \
|
2021-10-16 14:25:32 +03:00
|
|
|
-DGIT_COMMIT=\"$(GIT_COMMIT)\" \
|
|
|
|
-DGIT_BRANCH=\"$(GIT_BRANCH)\" \
|
|
|
|
-DGIT_BRANCH_NUM=\"$(GIT_BRANCH_NUM)\" \
|
|
|
|
-DBUILD_DATE=\"$(BUILD_DATE)\" \
|
|
|
|
-DVERSION=\"$(VERSION)\" \
|
|
|
|
-DTARGET=$(HARDWARE_TARGET)
|