On 2010-01-25 18:14Z, Ted Byers wrote: > > One last question. Right now, I have: > > CPPFLAGS = -Wall -pedantic -I ../include > > I haven't set a variable for linking, so I suppose I am using whatever > default value there may be (if there is one).
See "Variables Used by Implicit Rules" in the gnu make manual. LDFLAGS --> linker CPPFLAGS --> preprocessor (not C++ '.cpp' files) CFLAGS --> C compiler CXXFLAGS --> C++ compiler This probably works for you: > CPPFLAGS = -Wall -pedantic -I ../include because all preprocessor flags are being passed to the compiler, but more canonically you'd split them: CPPFLAGS = -I ../include CXXFLAGS = -Wall -pedantic > What would be the procedure to extend the CPPFLAGS (and whatever the > corresponding link variable) so that if I invoke it in one way, the > executable has all the debug info and no optimization, and if invoked in > another way, without debug info and full optimization? Ideally, if I > specify either 'make debug' or 'make production', all the code, whether for > a library or for the executable, would be compiled with either the debug > info and no optimization or no debug info and full optimization. Is there a > standard way to do this? See "Variables for Specifying Commands" in the gnu make manual (the ALL_CFLAGS example). _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
