[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=/
|
||||
|
||||
.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:
|
||||
|
Loading…
Reference in New Issue
Block a user