title: Makefile: all vs default targets
body: <p>Talking with respect to GNU make, what is the difference  between PHONY targets <code>all:</code> and <code>default:</code>.</p>
  
  <pre><code>CC=g++
  default: hello
  
  hello: hello.cpp
       $(CC) -o hello hello.cpp
  </code></pre>
  
  <p>and</p>
  
  <pre><code>CC=g++
  all: hello
  
  hello: hello.cpp
       $(CC) -o hello hello.cpp
  </code></pre>
  
  <p>Both of them do the same job.</p>