Add install rule to Makefile.

This commit is contained in:
Mid Favila 2022-08-19 15:36:16 -04:00
parent 2baca20487
commit a152301109
1 changed files with 9 additions and 2 deletions

View File

@ -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