aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 15 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4eae860..0417ed8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,11 @@
-CFLAGS=-O2 -fPIC -Wall
+# Makefile for uxd, by B. Watson. WTFPL.
-# these only affect the 'install' target (they don't get compiled
-# into the binary).
+### Override these variables as needed. Don't override CFLAGS; use
+# MYCFLAGS instead.
+MYCFLAGS=-O2 -fPIC -Wall
+
+# These only affect the 'install' target (they don't get compiled
+# into the binary).
PREFIX=/usr
MANDIR=$(PREFIX)/man
MAN1DIR=$(MANDIR)/man1
@@ -12,6 +16,14 @@ INSTALL_PROGRAM=install -s -m0755
GZIP=gzip -9
GZIP_MAN=yes
+#
+### No user-serviceable parts below.
+
+VERSION=0.1.0
+
+DEFINES=-DVERSION='"$(VERSION)"'
+CFLAGS=$(MYCFLAGS) $(DEFINES)
+
.PHONY: all test man clean install
all: uxd man