From 932b0ff87433e00415ca50f1031820db5a522309 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 10 Dec 2017 11:54:04 +0100 Subject: makefile: add install and uninstall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 73e7fb2..86ad740 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,19 @@ all: learn-your-telephone-number learn-your-telephone-number: learn-your-telephone-number.o $(CC) -o $@ $@.o $(LDFLAGS) +install: learn-your-telephone-number + mkdir -p -- "$(DESTDIR)$(PREFIX)/bin/" + mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/" + mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/learn-your-telephone-number/" + cp -- learn-your-telephone-number "$(DESTDIR)$(PREFIX)/bin/" + cp -- learn-your-telephone-number.1 "$(DESTDIR)$(MANPREFIX)/man1/" + cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/learn-your-telephone-number/" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/bin/learn-your-telephone-number" + -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/learn-your-telephone-number.1" + -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/learn-your-telephone-number/" + clean: -rm -f -- learn-your-telephone-number *.o -- cgit v1.2.3-70-g09d2