On 2010-12-01 23:56, Albert Graef wrote:
IOhannes m zmölnig wrote:
however, afaict, CFLAGS and LDFLAGS are commonly meant to be settable by the user, so setting those should not break the build system.
Exactly. Therefore a Makefile should *not* set CFLAGS, CXXFLAGS, LDFLAGS and the like, or only set them to some reasonable defaults which can be freely overridden by the user. Of course this means that build-specific options must be passed in the corresponding Makfile rules in addition to these variables.
finarlly someone who understands me!
This is only a convention, of course, but it's part of the GNU Coding Standards
ha, thank you very much for the pointer. i think the curcial part is: "If there are C compiler options that must be used for proper compilation of certain files, do not include them in CFLAGS. Users expect to be able to specify CFLAGS freely themselves."
and i think this can also be extrapolated for any of the standard flags (CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS)
masdr IOhannes