aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
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: