diff --git a/Makefile b/Makefile index fbc52d5..442d562 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ OBJ.DIR := obj # INC.DIR := include SRC := fetch.c main.c -OBJ := ${OBJ.DIR}/fetch.o ${OBJ.DIR}/main.o +OBJ := fetch.o main.o # HDR := VPATH := ${INC.DIR}:${SRC.DIR}:${OBJ.DIR} @@ -28,20 +28,16 @@ CFLAGS := ${CFLAGS} -fsanitize=${SAN} CPPFLAGS := ${CPPFLAGS} -DPROGN="\"${PROGN}\"" -all: ${PROGN} +.c.o: + ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $< -${PROGN}: ${OBJ.DIR} ${PREFIX} ${HDR} ${OBJ} +${PROGN}: ${OBJ.DIR} ${HDR} ${OBJ} ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${OBJ} ${LDFLAGS} -${OBJ.DIR}/main.o: ${SRC.DIR}/main.c - ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ ${SRC.DIR}/main.c -${OBJ.DIR}/fetch.o: ${SRC.DIR}/fetch.c - ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ ${SRC.DIR}/fetch.c - # include/config.h: include/config.mk.h # cp -f $< $@ -${OBJ.DIR} ${PREFIX}: +${OBJ.DIR}: mkdir -p $@ clean: