Turn Make Options into Tool Flags

Posted by Scott_Ruecker on Jul 21, 2008 3:53 PM
By Linux Journal
Mail this story
Web version

Often times when developing programs there is a need to build the program in/for multiple configurations. Many times, autoconf and its resulting configure script do what you need. Other times you can just change a #define in your code. But sometimes, autoconf isn't an option and changing a define doesn't quite work (say you need to pass your defines/undefines to m4 or some other tool that can't handle include files). The solution is probably to change your makefile. The method presented here results in a fairly compact change to your makefile

Full Story

Printed at http://lxer.com/module/newswire/view/105749/index.html