From 9a552adf3e33a7ea41a4eedc6150c1ece27952fe Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 17 Aug 2014 23:29:15 +0200 Subject: add install and uninstall rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4ecb2e0..14d5819 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,20 @@ obj/%.o: src/%.c src/*.h $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< +.PHONY: install +install: bin/file2key + install -dm755 -- "$(DESTDIR)$(BINDIR)" + install -m755 bin/file2key -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" + install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + install -m644 LICENSE COPYING -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + +.PHONY: uninstall +uninstall: + -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING" + -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE" + -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" + .PHONY: clean clean: -- cgit v1.2.3-70-g09d2