From fad4fe5f625d5eb7a5b267314827a28cdf6a11d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Thu, 15 Oct 2020 13:11:00 +0000 Subject: [PATCH] Allow make PREFIX= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ad966c9..4ce964f 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,17 @@ CC = cc CFLAGS = -Wall -O2 prefix = /usr/local +PREFIX = $(prefix) secret: - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) secret.c -o secret + $(X)$(CC) $(EXTRA) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) secret.c -o secret install: secret - mkdir -p $(DESTDIR)$(prefix)/bin - mv -f secret $(DESTDIR)$(prefix)/bin + mkdir -p $(DESTDIR)$(PREFIX)/bin + mv -f secret $(DESTDIR)$(PREFIX)/bin uninstall: - rm -f $(DESTDIR)$(prefix)/bin/secret + rm -f $(DESTDIR)$(PREFIX)/bin/secret clean: rm -f secret