[Makefile] Added .PHONY. Removed object compilation. This project won't get extra .c files anyway, so let's compile directly into executable.
This commit is contained in:
parent
1abcf3d4cc
commit
1799c62c48
11
Makefile
11
Makefile
@ -7,17 +7,14 @@ OBJ_DIR=obj
|
|||||||
|
|
||||||
DESTDIR=/
|
DESTDIR=/
|
||||||
|
|
||||||
|
.PHONY: all ${TARGET} clean install uninstall
|
||||||
|
|
||||||
all: ${TARGET}
|
all: ${TARGET}
|
||||||
|
|
||||||
${TARGET}: ${OBJ_DIR}/main.o
|
${TARGET}: ${SRC_DIR}/main.c ${SRC_DIR}/main.h
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} ${LDFLAGS} $< -o $@
|
||||||
|
|
||||||
${OBJ_DIR}/main.o: ${SRC_DIR}/main.c ${SRC_DIR}/main.h
|
|
||||||
@mkdir -p ${OBJ_DIR}
|
|
||||||
${CC} ${CFLAGS} -c $< -o $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -r ${OBJ_DIR}
|
|
||||||
rm ${TARGET}
|
rm ${TARGET}
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
Loading…
Reference in New Issue
Block a user