aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar sin <sin@2f30.org>2014-10-21 16:52:40 +0100
committerGravatar sin <sin@2f30.org>2014-10-21 16:52:40 +0100
commit65c1dfe1678ba53f2a55e18d508b19a4348d7291 (patch)
treebbab6a27f0fb8ec68eeb853047526b6255046d13 /Makefile
parent12106af2a774159cf61934a235639ab4b6ef3bd5 (diff)
downloadnnn-65c1dfe1678ba53f2a55e18d508b19a4348d7291.tar.gz
Add install/uninstall targets
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6ef0508..4146a77 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+PREFIX = /usr/local
#CPPFLAGS += -DDEBUG
#CFLAGS += -g
LDLIBS = -lncursesw
@@ -19,5 +20,15 @@ noice.o: noice.c queue.h util.h
strlcpy.o: strlcpy.c util.h
$(CC) $(CFLAGS) -c strlcpy.c
+install: all
+ @echo installing $(BIN) to $(DESTDIR)$(PREFIX)/bin
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+ @cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
+ @chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN)
+
+uninstall:
+ @echo removing $(BIN) from $(DESTDIR)$(PREFIX)/bin
+ @rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
+
clean:
rm -f $(BIN) $(OBJ)