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
commite068c8fd317d83380c1a0043c26262234f105ff2 (patch)
tree3da2cf33863d2a2ae74027e6cd64a820f21a99d3 /bin/Makefile
parentFix crash trying to print "this commit" on 404s (diff)
downloadsrc-e068c8fd317d83380c1a0043c26262234f105ff2.tar.gz
src-e068c8fd317d83380c1a0043c26262234f105ff2.zip
Add freecell
Diffstat (limited to 'bin/Makefile')
-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 > $@