diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-08-12 05:46:02 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-08-12 05:46:05 +0200 |
commit | 4d9c55249045c63f3e353dc9459501b4401c80fc (patch) | |
tree | 460675d2bb1b7f25a8ebe6a11891c166713c6e43 | |
parent | add makefile, deps and the entire code (diff) | |
download | alarm-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>
-rw-r--r-- | Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 |