about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2023-10-21 10:07:50 -0400
committerZach DeCook <zachdecook@librem.one>2023-10-21 10:07:50 -0400
commit5b441f86e98edbef86c6bf33785ba1555e9d4756 (patch)
tree985ea04f682fa1f70d444650a8330427852d8066 /Makefile
parent0bb685ea05f554a07fbc98f861eef6dc4f79eb31 (diff)
downloadswipeGuess-5b441f86e98edbef86c6bf33785ba1555e9d4756.tar.gz
Makefile: Create this
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f9ed3b6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+PREFIX?=/usr/local
+
+all: swipeGuess mapScore docs
+swipeGuess: swipeGuess.c
+	$(CC) swipeGuess.c -o swipeGuess
+mapScore: mapScore.c
+	$(CC) mapScore.c -o mapScore
+docs: swipeGuess.1 mapScore.1
+swipeGuess.1: swipeGuess.1.scd
+	scdoc < swipeGuess.1.scd > swipeGuess.1
+mapScore.1: mapScore.1.scd
+	scdoc < mapScore.1.scd > mapScore.1
+
+install: all
+	install -m755 swipeGuess -t "$(DESTDIR)/$(PREFIX)/bin/"
+	install -m755 mapScore -t "$(DESTDIR)/$(PREFIX)/bin/"
+	install -m644 swipeGuess.1 -t "$(DESTDIR)/$(PREFIX)/share/man/man1/"
+	install -m644 mapScore.1 -t "$(DESTDIR)/$(PREFIX)/share/man/man1/"
+uninstall:
+	rm -f "$(DESTDIR)/$(PREFIX)/bin/swipeGuess"
+	rm -f "$(DESTDIR)/$(PREFIX)/bin/mapScore"
+	rm -f "$(DESTDIR)/$(PREFIX)/share/man/man1/swipeGuess.1"
+	rm -f "$(DESTDIR)/$(PREFIX)/share/man/man1/mapScore.1"