commit e856ff6f2e3a20f91c611cba0cb464fcfec865fd parent 076b8174eea8530aba8619b4ab07923d94235753 Author: in0rdr <andreas.gruhler@uzh.ch> Date: Wed, 23 Nov 2016 15:18:28 +0800 Merge pull request #10 from shaggytwodope/master add prefix to makefile Diffstat:
M | Makefile | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,6 +1,7 @@ TARGET = diary SRC = diary.c -INSTALL_DIR = /usr/local/bin +PREFIX ?= /usr/local +BINDIR ?= $(DESTDIR)$(PREFIX)/bin CC = gcc CFLAGS = -lncurses @@ -14,7 +15,7 @@ clean: rm -f $(TARGET) install: $(TARGET) - cp $(TARGET) $(INSTALL_DIR)/$(TARGET) + cp $(TARGET) $(BINDIR)/$(TARGET) uninstall: - rm -f $(INSTALL_DIR)/$(TARGET) + rm -f $(BINDIR)/$(TARGET)