summary refs log tree commit diff
path: root/bin/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-04-17 20:03:26 -0400
committerJune McEnroe <june@causal.agency>2021-04-17 20:03:45 -0400
commitdaeee17ff71cf72a0270fd0c1b8eab59a3d5c12c (patch)
tree616815099edad08638ac4d3848383c42f0040dce /bin/Makefile
parentFix crash trying to print "this commit" on 404s (diff)
downloadsrc-daeee17ff71cf72a0270fd0c1b8eab59a3d5c12c.tar.gz
src-daeee17ff71cf72a0270fd0c1b8eab59a3d5c12c.zip
Add freecell
Diffstat (limited to '')
-rw-r--r--bin/Makefile27
1 files changed, 16 insertions, 11 deletions
diff --git a/bin/Makefile b/bin/Makefile
index e4ead85c..bf92d208 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -9,6 +9,7 @@ CFLAGS += -Wall -Wextra -Wpedantic -Wno-gnu-case-range
 
 LDLIBS.dtch = -lutil
 LDLIBS.fbclock = -lz
+LDLIBS.freecell = -lcurses
 LDLIBS.glitch = -lz
 LDLIBS.hnel = -lutil
 LDLIBS.modem = -lutil
@@ -54,18 +55,23 @@ BINS_LINUX += psfed
 BINS_TLS += relay
 BINS_TLS += typer
 
-BINS_ALL = ${BINS} ${BINS_BSD} ${BINS_LINUX} ${BINS_TLS}
+GAMES += freecell
+
+BINS_ALL = ${BINS} ${BINS_BSD} ${BINS_LINUX} ${BINS_TLS} ${GAMES}
 
 MANS = ${BINS:%=man1/%.1}
 MANS_BSD = ${BINS_BSD:%=man1/%.1}
+MANS_GAMES = ${GAMES:%=man6/%.6}
 MANS_LINUX = ${BINS_LINUX:%=man1/%.1}
 MANS_TLS = ${BINS_TLS:%=man1/%.1}
-MANS_ALL = ${BINS_ALL:%=man1/%.1}
+MANS_ALL = ${MANS} ${MANS_BSD} ${MANS_LINUX} ${MANS_TLS} ${MANS_GAMES}
 
 any: meta ${BINS}
 
 bsd: meta ${BINS_BSD}
 
+games: meta ${GAMES}
+
 linux: meta ${BINS_LINUX}
 
 tls: meta ${BINS_TLS}
@@ -117,15 +123,6 @@ setuid: bri
 	chown root bri
 	chmod u+s bri
 
-link:
-	install -d ${PREFIX}/bin ${MANDIR}/man1
-	ln -fs ${BINS_ALL:%=${PWD}/%} ${PREFIX}/bin
-	ln -fs ${MANS_ALL:%=${PWD}/%} ${MANDIR}/man1
-
-unlink:
-	rm -f ${BINS_ALL:%=${PREFIX}/bin/%}
-	rm -f ${MANS_ALL:%=${MANDIR}/%}
-
 install: ${BINS} ${MANS}
 	install -d ${PREFIX}/bin ${MANDIR}/man1
 	install ${BINS} ${PREFIX}/bin
@@ -136,6 +133,11 @@ install-bsd: ${BINS_BSD} ${MANS_BSD}
 	install ${BINS_BSD} ${PREFIX}/bin
 	install -m 644 ${MANS_BSD} ${MANDIR}/man1
 
+install-games: ${GAMES} ${MANS_GAMES}
+	install -d ${PREFIX}/bin ${MANDIR}/man6
+	install ${GAMES} ${PREFIX}/bin
+	install -m 644 ${MANS_GAMES} ${MANDIR}/man6
+
 install-linux: ${BINS_LINUX} ${MANS_BSD}
 	install -d ${PREFIX}/bin ${MANDIR}/man1
 	install ${BINS_LINUX} ${PREFIX}/bin
@@ -180,6 +182,9 @@ htmltags: *.[chly] mtags Makefile *.sh
 .pl.html:
 	sh html.sh man1/${<:.pl=.1} $< > $@
 
+freecell.html: freecell.c man6/freecell.6
+	sh html.sh man6/freecell.6 freecell.c > $@
+
 index.html: README.7 Makefile html.sh
 	sh html.sh README.7 Makefile html.sh > $@