title: One makefile for two compilers
body: <p>I have two makefiles, for native and cross compilation. The only difference between them is compiler name:</p>
  
  <pre>
  # makefile
  CC = g++
  ...
  </pre>
  
  <pre>
  # makefile-cc
  CC = arm-linux-gnueabihf-g++
  ...
  </pre>
  
  <p>To make native compilation, I execute <code>make</code>, to make cross-compilation, I execute <code>make -f makefile-cc</code>. I want to have one <code>makefile</code>, which should be executed using <code>make</code> for native compilation, and <code>make cross</code> for cross-compilation. What is correct syntax to do this, something like:</p>
  
  <pre>
  # makefile (C-like pseudo-code)
  if cross
      CC = arm-linux-gnueabihf-g++
  else
      CC = g++
  </pre>