From 1212a9cc6c2a092359db460d9f62822b56dc02ef Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 16 Jul 2024 11:43:44 +0200 Subject: Correct DESTDIR/PREFIX usage in Makefile Closes #56 --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c89fcf8..c751508 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CC ?= gcc CFLAGS ?= -std=c11 -Wall -Wextra -O3 -Wno-sign-compare LIBS := -lm -DESTDIR ?= /usr/local/bin +PREFIX ?= /usr/local all: lolcat censor @@ -22,8 +22,8 @@ censor: censor.c $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) install: lolcat censor - install lolcat $(DESTDIR)/lolcat - install censor $(DESTDIR)/censor + install lolcat $(DESTDIR)$(PREFIX)/bin/lolcat + install censor $(DESTDIR)$(PREFIX)/bin/censor clean: rm -f lolcat censor -- cgit