aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-08-17 23:29:15 +0200
committerMattias Andrée <maandree@operamail.com>2014-08-17 23:29:15 +0200
commit9a552adf3e33a7ea41a4eedc6150c1ece27952fe (patch)
tree1c8b9f9c0bdd82075c3d907f66fca5a58e739903
parentmisc + add makefile (diff)
downloadfile2key-9a552adf3e33a7ea41a4eedc6150c1ece27952fe.tar.gz
file2key-9a552adf3e33a7ea41a4eedc6150c1ece27952fe.tar.bz2
file2key-9a552adf3e33a7ea41a4eedc6150c1ece27952fe.tar.xz
add install and uninstall rules1
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
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: