From 5d741078bd6ecebc6ea1405df749e49b9376cbde Mon Sep 17 00:00:00 2001 From: Derek Pressnall Date: Wed, 20 Aug 2014 17:01:51 -0500 Subject: [PATCH] Updated make file to use DESTDIR --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ebdfe51..7da5fd9 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ CC=gcc PROGS=snebu SCRIPTS=snebu-client +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin all: $(PROGS) snebu: snebu.c $(CC) $< -o $@ -l sqlite3 -l crypto -l lzo2 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -O3 -install: $(PROGS) - cp -p $(PROGS) $(SCRIPTS) /usr/local/bin/ +install: $(PROGS) $(SCRIPTS) + mkdir -p $(DESTDIR)$(BINDIR) + cp -f $(PROGS) $(SCRIPTS) $(DESTDIR)$(BINDIR)/ clean: rm -f $(PROGS)