Please explain this Makefile - executable rule appears to be missing
<p>I have this makefile which I don't understand. </p>

<pre><code>build_sources:=$(wildcard *.cpp)
depends:=$(build_sources:.cpp=.d)
build_targets:=$(build_sources:.cpp=)

.PHONY: all
all: $(build_targets)

.PHONY: clean
clean:
    rm -f $(build_targets) *.{a,o,d}

#build the list of header file dependencies automatically
%.d: %.cpp
    @echo building include dependencies for $(*F)
    @$(CXX) -MM $(CPPFLAGS) $&lt; | { sed 's#\($*\)\.o[ :]*#\1.o $@ : #g' ; echo "%.h:;" ; } &gt; $@

-include $(depends)
</code></pre>

<p>I understand that the executables created are <code>build_target</code>. So if I have <code>Foo.cpp</code> and <code>Bar.cpp</code>, the executables created would be <code>Foo</code> and <code>Bar</code>. </p>

<p>But how does it do that? I only see 1 rule, and it is <code>%.d: %.cpp</code>. So it's saying the <code>Foo.d</code> file depends on <code>Foo.cpp</code>. But what about the rule to actually compile <code>Foo</code>? </p>

<p>This makefile works, so it's not actually missing anything. But how come I don't see the rule? Is there some implicit rule?</p>

<p>EDIT - i did make debug, and saw the following</p>

<pre><code>No need to remake target `foo.d'.
  Considering target file `foo'.
   File `foo' does not exist.
   Looking for an implicit rule for `foo'.
   Trying pattern rule with stem `foo'.
   Trying implicit prerequisite `foo.o'.
Found an implicit rule for `foo'.      ## WHAT EXACTLY IS THIS?
Considering target file `foo.o'.
 File `foo.o' does not exist.
 Looking for an implicit rule for `foo.o'.
 Trying pattern rule with stem `foo'.
 Trying implicit prerequisite `foo.c'.
 Trying pattern rule with stem `foo'.
 Trying implicit prerequisite `foo.cc'.
 Trying pattern rule with stem `foo'.
 Trying implicit prerequisite `foo.C'.
 Trying pattern rule with stem `foo'.
 Trying implicit prerequisite `foo.cpp'.
 Found an implicit rule for `foo.o'.
  Pruning file `foo.cpp'.
  Pruning file `foo.cpp'.
 Finished prerequisites of target file `foo.o'.
Must remake target `foo.o'.
g++   -I../../include -Wall -std=c++11 -O3  -Wsign-compare -Wno-strict-aliasing -s  -c -o foo.o foo.cpp
</code></pre>

<p>That's great. This must be the rule that's getting called. But where is this rule from? How do I know what default rules exist?</p>