From a15230110946bc0ebaba447d9ce1297e52448a62 Mon Sep 17 00:00:00 2001 From: Mid Favila Date: Fri, 19 Aug 2022 15:36:16 -0400 Subject: [PATCH] Add install rule to Makefile. --- src/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index df09793..b0718d2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,10 +4,11 @@ CC = cc CFLAGS = -Wall -O2 LDFLAGS = -static LDLIBS = -PREFIX = /usr/local/bin/ +PREFIX = /usr/local/ DESTDIR = +BIN = echo yes true false cat -all: echo yes true false cat +all: ${BIN} echo: echo.c wc: wc.c yes: yes.c @@ -16,9 +17,15 @@ false: ln -s true false cat: cat.c +install: all + install -Dm0775 ${BIN} ${DESTDIR}${PREFIX}bin + clean: rm echo true yes false cat .SUFFIXES: .c .o .c.o: ${CC} ${CFLAGS} ${LDFLAGS} -c $< + +: + echo hello