Compilers normally use the -D flagseg Code: test.o: test.cpp $(CC) $(CFLAGS) -DTEST1 test.cpp -o $@ 转载于:https://www.cnblogs.com/jvava/p/3751242.html