title: Append compile flags to CFLAGS and CXXFLAGS while configuration/make
body: <p>The project that I am trying to build has default flags </p>
  
  <pre><code>CFLAGS = -Wall -g -O2
  
  CXXFLAGS = -g -O2
  </code></pre>
  
  <p>I need to append a flag <code>-w</code> to both these variables (to remove: 'consider all warnings as errors')</p>
  
  <p>I have a method to work it out, give</p>
  
  <pre><code>make 'CFLAGS=-Wall -g -O2 -w'; 'CXXFLAGS=-g -O2 -w'
  </code></pre>
  
  <p>OR</p>
  
  <p>Run <code>./configure</code> and statically modify <code>Makefile</code></p>
  
  <p>But I want to append my options with the existing options while running <code>configure</code> or <code>make</code></p>
  
  <p>The post
  <a href="https://stackoverflow.com/questions/11647208/where-to-add-a-cflag-such-as-std-gnu99-into-an-autotools-project">Where to add a CFLAG, such as -std=gnu99, into an autotools project</a>
  conveniently uses a macro to achieve this.</p>