summary refs log tree commit diff
path: root/bin/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-09-07 19:24:59 -0400
committerJune McEnroe <june@causal.agency>2018-09-07 19:24:59 -0400
commitc18ac6145b77f55ff6c9d5877f0a74f62cff4a3a (patch)
tree398d5c701f73177372ff19073b01fd241a5b1bbe /bin/Makefile
parentPass "command ..." as one string to Ar (diff)
downloadsrc-c18ac6145b77f55ff6c9d5877f0a74f62cff4a3a.tar.gz
src-c18ac6145b77f55ff6c9d5877f0a74f62cff4a3a.zip
Add klon.6
Diffstat (limited to 'bin/Makefile')
-rw-r--r--bin/Makefile41
1 files changed, 26 insertions, 15 deletions
diff --git a/bin/Makefile b/bin/Makefile
index 6038d2e4..821e91d0 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -1,22 +1,29 @@
 PREFIX = ~/.local
 
-ANY_BINS = atch dtch glitch hnel modem open pbcopy pbd pbpaste pngo scheme wake xx
-BSD_BINS = klon watch
-LIN_BINS = bri fbatt fbclock
-ALL_BINS = $(ANY_BINS) $(BSD_BINS) $(LIN_BINS)
-ALL_MANS = $(ALL_BINS:%=%.1)
+BINS = atch dtch glitch hnel modem open pbcopy pbd pbpaste pngo scheme wake xx
+BINS_BSD = watch
+BINS_LINUX = bri fbatt fbclock
+BINS_ALL = $(BINS) $(BINS_BSD) $(BINS_LINUX) $(GAMES_BSD)
+
+GAMES_BSD = klon
+GAMES_ALL = $(GAMES_BSD)
+
+MAN1 = $(BINS_ALL:%=%.1)
+MAN6 = $(GAMES_ALL:%=%.6)
 
 CFLAGS += -Wall -Wextra -Wpedantic
 LDLIBS = -lcurses -lm -lutil -lz
 
-any: .gitignore tags $(ANY_BINS)
+any: .gitignore tags $(BINS)
 
-bsd: any $(BSD_BINS)
+bsd: any $(BINS_BSD) $(GAMES_BSD)
 
-linux: any $(LIN_BINS)
+linux: any $(BINS_LINUX)
 
 .gitignore: Makefile
-	echo tags scheme.h *.o $(ALL_BINS) scheme.png | tr ' ' '\n' > .gitignore
+	echo tags scheme.h *.o $(BINS_ALL) $(GAMES_ALL) scheme.png \
+		| tr ' ' '\n' \
+		> .gitignore
 
 tags: *.c
 	ctags -w *.c
@@ -40,13 +47,17 @@ setuid: bri
 	chmod u+s bri
 
 clean:
-	rm -f tags $(ALL_BINS)
+	rm -f tags $(BINS_ALL) $(GAMES_ALL)
 
 link:
-	mkdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1
-	ln -s -f $(ALL_BINS:%=$(PWD)/%) $(PREFIX)/bin
-	ln -s -f $(ALL_MANS:%=$(PWD)/%) $(PREFIX)/share/man/man1
+	mkdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1 $(PREFIX)/share/man/man6
+	ln -s -f $(BINS_ALL:%=$(PWD)/%) $(PREFIX)/bin
+	ln -s -f $(GAMES_ALL:%=$(PWD)/%) $(PREFIX)/bin
+	ln -s -f $(MAN1:%=$(PWD)/%) $(PREFIX)/share/man/man1
+	ln -s -f $(MAN6:%=$(PWD)/%) $(PREFIX)/share/man/man6
 
 unlink:
-	rm -f $(ALL_BINS:%=$(PREFIX)/bin/%)
-	rm -f $(ALL_MANS:%=$(PREFIX)/share/man/man1/%)
+	rm -f $(BINS_ALL:%=$(PREFIX)/bin/%)
+	rm -f $(GAMES_ALL:%=$(PREFIX)/bin/%)
+	rm -f $(MAN1:%=$(PREFIX)/share/man/man1/%)
+	rm -f $(MAN6:%=$(PREFIX)/share/man/man6/%)