cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit e23ef0528e578f3004493ada55cd611eff3e6fc7
parent 5be16542a3ad371cccb8d4da0ffbe3994e67c131
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu, 23 Jul 2020 11:52:23 +0300

Makefile: use objects

Diffstat:
MMakefile | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git 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}