Makefile 简单基本示例
CXX := g++ -O0
CXXFLAGS := -std=c++11 -O0
all: ProjectPartA ProjectPartB
ProjectPartA: ProjectPartA.o
$(CXX) -o $@ $^
ProjectPartB: ProjectPartB.o
$(CXX) -o $@ $^
test:
./ProjectPartA
./ProjectPartB
BIN=ProjectPartA ProjectPartB
clean:
rm -f *.o $(BIN)
.PHONY: all clean test