From 226c922903177ec04bf4078d1688f1224b33c94b Mon Sep 17 00:00:00 2001 From: merakor Date: Thu, 23 Jul 2020 08:52:22 +0000 Subject: Makefile: use objects FossilOrigin-Name: 20e158603eaf7411d6b298e46c4f879523abb79e85825535720789b445dd06ee --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7a6a6a5..29c575c 100644 --- a/Makefile +++ b/Makefile @@ -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} -- cgit v1.2.3