Makefiel----no rule to make target 错误问题

%.cppo :%.cpp %.h
    @echo Compiling Src file:[$(notdir $<)]...
    $(CC) $(CXXFLAGS) -c $< -o $@

当没有 %.h时,会出错。
make: *** No rule to make target 'CircularQueueTest.cppo', needed by 'gtest'。 停止。
因此,依赖文件必须都存在。

原文地址:https://www.cnblogs.com/elseliving/p/7895236.html