diff options
author | merakor <cem@ckyln.com> | 2020-07-23 08:52:22 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-07-23 08:52:22 +0000 |
commit | 226c922903177ec04bf4078d1688f1224b33c94b (patch) | |
tree | 27346648f18e2829a7f1a4222d09111f979e5677 | |
parent | 22ccf8218e2b3fa36d697ea37af34c49fb08563d (diff) | |
download | cpt-226c922903177ec04bf4078d1688f1224b33c94b.tar.gz |
Makefile: use objects
FossilOrigin-Name: 20e158603eaf7411d6b298e46c4f879523abb79e85825535720789b445dd06ee
-rw-r--r-- | Makefile | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,15 +1,20 @@ # See LICENSE for copyright information include config.mk -BIN = bin/kiss-readlink bin/kiss-stat +SRC = bin/kiss-readlink.c bin/kiss-stat.c +OBJ = ${SRC:.c=.o} +BIN = ${SRC:.c=} all: ${BIN} -.c: - ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $< ${LIBS} +.c.o: + ${CC} ${CFLAGS} -c -o $@ $< + +${BIN}: ${OBJ} + ${CC} ${LDFLAGS} -o $@ $< ${LIBS} clean: - rm -f ${BIN} + rm -f ${BIN} ${OBJ} install: all mkdir -p ${DESTDIR}${BINDIR} |