diff Makefile @ 7:180e42b65105 1.0

Finalizing
author Atarwn Gard <a@qwa.su>
date Sun, 12 Oct 2025 21:57:17 +0500
parents 3726f37deac1
children
line wrap: on
line diff
--- a/Makefile	Sun Oct 12 21:20:25 2025 +0500
+++ b/Makefile	Sun Oct 12 21:57:17 2025 +0500
@@ -1,6 +1,8 @@
 TARGET = gbwm
 CC ?= cc
-CFLAGS ?= -O2 -Wall
+HGVERSION = $(shell hg log -r . --template "{latesttag}-{latesttagdistance}-{node|short}" 2>/dev/null)
+VERSION = $(if $(HGVERSION),$(HGVERSION),dev)
+CFLAGS ?= -O2 -Wall -DVERSION=\"$(VERSION)\"
 PREFIX ?= /usr/local
 
 $(TARGET):