]> git.armaanb.net Git - pong.git/commitdiff
Add manpage
authorArmaan Bhojwani <me@armaanb.net>
Sat, 15 May 2021 19:01:08 +0000 (15:01 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Sat, 15 May 2021 19:01:08 +0000 (15:01 -0400)
.gitignore
Makefile
README
pong.1.scd [new file with mode: 0644]

index 8e5546941b00bc6729dd21cf2603a7a907bcad8b..f326245af7943890e4a2724545af49bda7f743ef 100644 (file)
@@ -1 +1,2 @@
 pong
+pong.1
index 269671baff3d5b107ce4edbfaa7830cf37241f38..a234c45070355bc1ad0ceeb62ebe85e616c34954 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,14 @@
 all:
-       ${CC} -o pong pong.c ${CLAGS} -lcurses ${LDFLAGS}
+       ${CC} -o pong pong.c ${CLAGS} -Wall -Wextra -std=c99 -pedantic \
+               -lcurses ${LDFLAGS}
+       scdoc < pong.1.scd > pong.1
 
-install:
+install: all
+       mkdir -p /usr/local/bin /usr/local/share/man/man1
        cp pong /usr/local/bin/pong
+       cp pong.1 /usr/local/share/man/man1/pong.1
 
 uninstall:
-       rm /usr/local/bin/pong
+       rm /usr/local/bin/pong /usr/local/share/man/man1/pong.1
 
 .PHONY: all
diff --git a/README b/README
index 86b577458e99ad1199d62be049182a3cbdd08a3b..305de6c2189f4912cca4795d0786b6c483087aa0 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 pong
 ----
 
-Simple pong game in ncurses.
+Simple pong game in ncurses. Further documentation can be found pong(1).
 
 Copyright Armaan Bhojwani MIT License 2021.
diff --git a/pong.1.scd b/pong.1.scd
new file mode 100644 (file)
index 0000000..360c026
--- /dev/null
@@ -0,0 +1,18 @@
+pong(1)
+
+# NAME
+pong - play a game of pong
+
+# SYNOPSIS
+pong
+
+# DESCRIPTION
+Simple text-mode pong game in ncurses
+
+# AUTHOR
+Armaan Bhojwani <me@armaanb.net>
+
+https://sr.ht/~armaan/pong
+
+# LICENSE
+Copyright Armaan Bhojwani MIT License 2021.