aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-08-12 05:46:02 +0200
committerMattias Andrée <maandree@operamail.com>2014-08-12 05:46:05 +0200
commit4d9c55249045c63f3e353dc9459501b4401c80fc (patch)
tree460675d2bb1b7f25a8ebe6a11891c166713c6e43
parentadd makefile, deps and the entire code (diff)
downloadalarm-4d9c55249045c63f3e353dc9459501b4401c80fc.tar.gz
alarm-4d9c55249045c63f3e353dc9459501b4401c80fc.tar.bz2
alarm-4d9c55249045c63f3e353dc9459501b4401c80fc.tar.xz
add install and uninstall rules
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 19aa4bc..55ef967 100644
--- a/Makefile
+++ b/Makefile
@@ -55,6 +55,22 @@ obj/%.o: src/%.c
$(CC) $(WARN) -std=$(STD) $(OPTIMISE) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+.PHONY: install
+install: bin/alarm
+ install -dm755 -- "$(DESTDIR)$(BINDIR)"
+ install -m755 bin/alarm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
+ install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+ install -m644 COPYING LICENSE -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+
+
+.PHONY: uninstall
+uninstall:
+ -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
+ -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING"
+ -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
+ -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+
+
.PHONY: clean
clean:
-rm -r bin obj