title: how do I make a makefile depend on the build options
body: <p>A long time ago, I remember using some Solaris make, and they had an ingenious option that would automatically detect when the compiler options had changed, and rebuild all rules appropriately.  For example, suppose I switch from:</p>
  
  <p>g++ -O3</p>
  
  <p>to </p>
  
  <p>g++ -g</p>
  
  <p>Then all files should be recompiled.  I'm using gnu make, and haven't found any feature like this, and was wondering whether anyone has a way of making it work.</p>