MakeTemplates/cxx/Makefile

19 lines
220 B
Makefile
Raw Normal View History

2021-11-21 17:06:20 +00:00
include config.mk
OBJ = ${SRC:.cpp=.o}
all: ${OBJ} ${OUT}
2021-11-21 17:06:20 +00:00
%.o: %.cpp
${CXX} -o $@ -c ${CXXFLAGS} $<
clean:
rm -f ${OBJ} ${OUT}
2021-11-21 17:06:20 +00:00
ifneq (${OUT},)
${OUT}: ${OBJ}
2021-11-21 17:06:20 +00:00
${CXX} -o "$@" ${LDFLAGS} $^
endif
.PHONY: all clean