本文共 366 字,大约阅读时间需要 1 分钟。
先来看makefile:
test1: test1.cppclean: @echo $(CXX) @echo $(CC) @echo $(AR) @echo $(RM) @echo $(CXXFLAGS) @echo $(CFLAGS) @echo $(ARFLAGS)再来看结果:
taoge@localhost Desktop> make allmake: *** No rule to make target `all'. Stop.taoge@localhost Desktop> make cleang++ccarrm -frvtaoge@localhost Desktop>在makefile中就是这样, 有默认命令和默认参数。 所以, 下次看到makefile中的CXX但没有发现其定义时, 就不要见怪了。
转载地址:http://xggvi.baihongyu.com/