[Top][All Lists]

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

Re: Why CFLAGS works but not name_CFLAGS sometimes?

From: Sander Niemeijer
Subject: Re: Why CFLAGS works but not name_CFLAGS sometimes?
Date: Thu, 8 May 2003 16:27:03 +0200

On dinsdag, mei 6, 2003, at 07:24 Europe/Amsterdam, <address@hidden> wrote:

Is there a reason sometimes name_CFLAGS
does not work and you must just do CFLAGS because
just CFLAGS by itself works???

This could be the case if you want to overrule an option in name_CFLAGS that is also in CFLAGS (for instance change the optimization setting). Because automake compiles with '$(CC) ... $(name_CFLAGS) $(CFLAGS) ...' an option in name_CFLAGS will be overruled by the option in CFLAGS. At least for gcc (but AFAIK this is the same for any compiler/linker) the last option has the highest precedence. The same holds for CPPFLAGS and LDFLAGS. However, there is one exception, which is the '-I' and '-L' options (in that case the first occurance has higher precedence).

Is this what you meant? Otherwise sent an example of what went wrong exactly.


reply via email to

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