From 1799c62c48526912b237ab00bb13d60223e62392 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 25 Dec 2021 23:22:32 +0400 Subject: [PATCH] [Makefile] Added .PHONY. Removed object compilation. This project won't get extra .c files anyway, so let's compile directly into executable. --- Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d1ebcbf..dcebd2a 100644 --- a/Makefile +++ b/Makefile @@ -7,17 +7,14 @@ OBJ_DIR=obj DESTDIR=/ +.PHONY: all ${TARGET} clean install uninstall + all: ${TARGET} -${TARGET}: ${OBJ_DIR}/main.o - ${CC} ${CFLAGS} $< -o $@ - -${OBJ_DIR}/main.o: ${SRC_DIR}/main.c ${SRC_DIR}/main.h - @mkdir -p ${OBJ_DIR} - ${CC} ${CFLAGS} -c $< -o $@ +${TARGET}: ${SRC_DIR}/main.c ${SRC_DIR}/main.h + ${CC} ${CFLAGS} ${LDFLAGS} $< -o $@ clean: - rm -r ${OBJ_DIR} rm ${TARGET} install: