我是编写 makefile 的新手。最近我在 makefile 中看到了模式规则。例如:
%.o: %.cc
# command to compile comes here
Run Code Online (Sandbox Code Playgroud)
经过在网上的严格搜索,我发现了上面的语句的作用,但是我遇到了下面的另一个语句。
%: %.o
# Command to link lies here
Run Code Online (Sandbox Code Playgroud)
我不明白这个规则。谁能解释一下第二个模式规则?