title: makefile: passing preprocessor through makefile to g++
body: <p>I saw previous SO posts <a href="https://stackoverflow.com/questions/5213800/how-to-define-c-preprocessor-variable-in-makefile">1</a>, <a href="https://stackoverflow.com/questions/2826029/passing-additional-variables-from-command-line-to-make">2</a> etc. I want to pass a preprocessor directive at compile time. With scons, I could do:</p>
  
  <pre><code>num_times = ARGUMENTS.get('c', 1)
  env.Append(CCFLAGS = '-DNUM_TIMES=%d' % int(num_times))
  </code></pre>
  
  <p>I hope, it should also be possible using make. I want to issue </p>
  
  <pre><code>make c=4
  </code></pre>
  
  <p>or something like that. Can someone suggest a method. I am compiling a folder, which has subfolders with their own makefiles. Thanks in advance.</p>