Get version string from git, instead of hardcoded in makefile

This commit is contained in:
Imbus 2026-02-09 13:52:57 +01:00
parent 734c1c10ec
commit 078ba792f0

View file

@ -1,7 +1,7 @@
GITREV ?= $(shell git describe --dirty --always)
BLDDATE ?= $(shell date -I)
CR_YEAR ?= $(shell date +%Y)
VERSION ?= "v0.2.1"
VERSION ?= "$(shell git describe --tags --always --abbrev=0 2>/dev/null || git rev-parse --short HEAD)"
CFLAGS ?= -Wall -Wextra -Wpedantic -O2 -std=gnu99
CFLAGS += -DGITREV='"$(GITREV)"'