From bb806fe2b669604ce1b61494b63d5487c7efe401 Mon Sep 17 00:00:00 2001 From: Carsten Teibes Date: Sat, 23 Aug 2014 02:06:42 +0200 Subject: [PATCH] Add DESTDIR variable to Makefile to allow easier packaging --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index be53384..8c09ba2 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ WORKDIR = `pwd` +DESTDIR = + CC = gcc CXX = g++ AR = ar @@ -131,9 +133,11 @@ clean_release: rm -f $(MAN_DIR)/$(MAN_PAGE) $(MAN_DIR)/$(MAN_PAGE).gz install: - install $(OUT_RELEASE) /usr/bin + mkdir -p $(DESTDIR)/usr/bin + install $(OUT_RELEASE) $(DESTDIR)/usr/bin if test -f $(MAN_DIR)/$(MAN_PAGE).gz; then \ - install $(MAN_DIR)/$(MAN_PAGE).gz /usr/share/man/man1; \ + mkdir -p $(DESTDIR)/usr/share/man/man1; \ + install $(MAN_DIR)/$(MAN_PAGE).gz $(DESTDIR)/usr/share/man/man1; \ fi uninstall: