automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding specific C flags for a SINGLE source file


From: Kevin P. Fleming
Subject: Re: adding specific C flags for a SINGLE source file
Date: Fri, 10 Dec 2004 08:58:45 -0700
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Sander Niemeijer wrote:

As a general remark, automake is not that clear in the precedence that compiler flags take (will FOOFLAGS come before or after AM_FOOFLAGS/target_FOOFLAGS) and if/how one would be able to overrule these flags. Important is also to notice that CXXFLAGS/CFLAGS or overruled by adding a new option at the end (e.g. '-O2 -O3' would end up meaning '-O3'), but with include/library search paths in CPPFLAGS/LDFLAGS it is exactly the other way around (e.g. '-Ifoo -Ibar' ends up meaning '-Ifoo' when you have a foo/foo.h and bar/foo.h). I think some notes about this in the documentation or FAQ would also be very helpful.

Those precedence rules regarding -O, -I, -L and etc. have nothing to do with the autotools, and everything to do with your toolchain. It would not be practical to document any of this in the autotools docs (since toolchains differ), nor would it even be relevant.

In other words, you need to understand how your toolchain processes these flags before trying to understand how autotools usage of them will affect your project.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]