summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2020-05-08 18:20:56 +0200
committerAki <please@ignore.pl>2020-05-08 18:20:56 +0200
commitcd8970863cc9cc2fd7223792394c17b1acee8d55 (patch)
tree01fde195e0f41bf32573570d2d55026cfa7ef078 /Makefile
parent50be9028140cdbc704f7f244193dbf213d1ca9ee (diff)
downloadplop-cd8970863cc9cc2fd7223792394c17b1acee8d55.zip
plop-cd8970863cc9cc2fd7223792394c17b1acee8d55.tar.gz
plop-cd8970863cc9cc2fd7223792394c17b1acee8d55.tar.bz2
Added install/uninstall targets to makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7607452..3b7fe68 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
CFLAGS+=-Wall -Wextra -Wpedantic
CFLAGS+=-I/usr/include/lua5.3
LDLIBS+=-llua5.3
+PREFIX?=/usr/local
plop: plop.o http.o http.h
http.o: http.h
@@ -8,4 +9,16 @@ http.o: http.h
clean:
rm -f plop *.o
-.PHONY: clean
+install: plop
+ mkdir -p $(PREFIX)/bin
+ mkdir -p $(PREFIX)/share/man/man1
+ cp -f plop $(PREFIX)/bin
+ cp -f plop.1 $(PREFIX)/share/man/man1
+ chmod 755 $(PREFIX)/bin/plop
+ chmod 644 $(PREFIX)/share/man/man1/plop.1
+
+uninstall:
+ rm -f $(PREFIX)/bin/plop
+ rm -f $(PREFIX)/share/man/man1/plop.1
+
+.PHONY: clean install uninstall