title: Switching from g++ to clang++ in makefile
body: <p>I 've got following makefile:</p>
  
  <pre><code>all: xmltest
  xmltest: xmltest.cpp tinyxml2.cpp tinyxml2.h
  </code></pre>
  
  <p>This works fine - after executing <code>make all</code> executable 'xmltest' is produced. </p>
  
  <p>However, I want to switch compiler to clang++. So I've added this line at the beginning of the file:</p>
  
  <pre><code>CXX=clang++
  </code></pre>
  
  <p>and now executing <code>make all</code> produces an error: </p>
  
  <pre><code>clang++     xmltest.cpp tinyxml2.cpp tinyxml2.h   -o xmltest
  clang++.exe: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated
  clang++.exe: error: cannot specify -o when generating multiple output files
  &lt;builtin&gt;: recipe for target 'xmltest' failed
  make: *** [xmltest] Error 1
  </code></pre>
  
  <p>How to fix this with <strong>minimal modifications</strong> to original make file?</p>