aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-11-14 06:37:35 -0500
committerB. Watson <urchlay@slackware.uk>2025-11-14 06:37:35 -0500
commitb6258a5d452fb2c6703fb4f0c1908cb1514c55e0 (patch)
tree88e2588ad5aea975666c71505e6091ece9f873a3 /src/Makefile
parent0f4d0a93434aa7586c9f66c6a48707b561ebf00a (diff)
downloadunalf-b6258a5d452fb2c6703fb4f0c1908cb1514c55e0.tar.gz
Embed version in unalf and man page.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 2c8a31d..7dac912 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,7 @@
+VERSION=0.1.0
+
COPT=-O3
-CFLAGS=-Wall -Wno-unused-label -I../f65 $(COPT)
+CFLAGS=-DVERSION='"$(VERSION)"' -Wall -Wno-unused-label -I../f65 $(COPT)
all: unalf unalf.1 alfsum alfsum.1
@@ -24,10 +26,13 @@ extract.o: extract.c addrs.h unalf.h ../f65/f65.h
../f65/f65.o: ../f65/f65.c ../f65/f65.h
-unalf.1: unalf.rst
+ver.rst:
+ echo '.. |version| replace:: $(VERSION)' > ver.rst
+
+unalf.1: unalf.rst ver.rst
rst2man unalf.rst > unalf.1
-alfsum.1: alfsum.rst
+alfsum.1: alfsum.rst ver.rst
rst2man alfsum.rst > alfsum.1
clean: