Add install rule to Makefile.
This commit is contained in:
parent
2baca20487
commit
a152301109
11
src/Makefile
11
src/Makefile
@ -4,10 +4,11 @@ CC = cc
|
|||||||
CFLAGS = -Wall -O2
|
CFLAGS = -Wall -O2
|
||||||
LDFLAGS = -static
|
LDFLAGS = -static
|
||||||
LDLIBS =
|
LDLIBS =
|
||||||
PREFIX = /usr/local/bin/
|
PREFIX = /usr/local/
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
|
BIN = echo yes true false cat
|
||||||
|
|
||||||
all: echo yes true false cat
|
all: ${BIN}
|
||||||
echo: echo.c
|
echo: echo.c
|
||||||
wc: wc.c
|
wc: wc.c
|
||||||
yes: yes.c
|
yes: yes.c
|
||||||
@ -16,9 +17,15 @@ false:
|
|||||||
ln -s true false
|
ln -s true false
|
||||||
cat: cat.c
|
cat: cat.c
|
||||||
|
|
||||||
|
install: all
|
||||||
|
install -Dm0775 ${BIN} ${DESTDIR}${PREFIX}bin
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm echo true yes false cat
|
rm echo true yes false cat
|
||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
.c.o:
|
.c.o:
|
||||||
${CC} ${CFLAGS} ${LDFLAGS} -c $<
|
${CC} ${CFLAGS} ${LDFLAGS} -c $<
|
||||||
|
|
||||||
|
:
|
||||||
|
echo hello
|
||||||
|
Loading…
Reference in New Issue
Block a user