Re: adding specific C flags for a SINGLE source file

2004-12-16 Thread Sander Niemeijer
On vrijdag, dec 10, 2004, at 21:35 Europe/Amsterdam, Alexandre Duret-Lutz wrote: user_CFLAGS=$CFLAGS AC_PROG_CC if test "x$user_CFLAGS" = x; then # If the user didn't specify CFLAGS, then CFLAGS contains # a subset of -g -O2 selected by AC_PROG_CC. This is not # a user setting, and we want

Re: adding specific C flags for a SINGLE source file

2004-12-16 Thread Sander Niemeijer
user_CFLAGS=$CFLAGS AC_PROG_CC if test "x$user_CFLAGS" = x; then # If the user didn't specify CFLAGS, then CFLAGS contains # a subset of -g -O2 selected by AC_PROG_CC. This is not # a user setting, and we want to be able to override this # locally in our rules, so put these flags in a sepa

Re: adding specific C flags for a SINGLE source file

2004-12-13 Thread Stepan Kasal
Hi, On Mon, Dec 13, 2004 at 10:43:13AM +0100, Sander Niemeijer wrote: > [...] would force you to create per target CFLAGS entries for all > other targets (e.g. 'bar_CFLAGS = $(DEFAULTFLAGS)'). no, you just set AM_CFLAGS = $(DEFAULTFLAGS) and it will apply to all targets without their own per tar

Re: adding specific C flags for a SINGLE source file

2004-12-13 Thread Sander Niemeijer
On vrijdag, dec 10, 2004, at 21:39 Europe/Amsterdam, Alexandre Duret-Lutz wrote: That documentation was delivered to your mailbox 10 days ago. It will be in 1.9.4. From: Alexandre Duret-Lutz <[EMAIL PROTECTED]> Subject: RFC for new FAQ entry: Flag Variables Ordering To: [EMAIL PROTECTED]

Re: adding specific C flags for a SINGLE source file

2004-12-10 Thread Alexandre Duret-Lutz
>>> "Jacob" == Jacob Meuser <[EMAIL PROTECTED]> writes: [...] Jacob> yes, but do the autotols document what order the variables (CFLAGS, Jacob> CPPFLAGS, AM_CPPFLAGS, etc) will appear in the rules? that is the Jacob> question being asked. That documentation was delivered to your mailbox 10 d

Re: adding specific C flags for a SINGLE source file

2004-12-10 Thread Alexandre Duret-Lutz
>>> "Bruce" == Bruce Allen <[EMAIL PROTECTED]> writes: [...] Bruce> In other words: Bruce> libboincbenchmark_a_CXXFLAGS=-O3 Bruce> CXXFLAGS=-g -O2 Bruce> and I end up with Bruce> -O3 -g -O2. Bruce> Any idea how to get around this? I have never been in this situation, so perhaps the idea b

Re: adding specific C flags for a SINGLE source file

2004-12-10 Thread Kevin P. Fleming
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

Re: adding specific C flags for a SINGLE source file

2004-12-09 Thread Bruce Allen
Alexandre, this comes *really* close to working. Problem is that in the Makefile one ends up with: $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libboincbenchmark_a_CPPFLAGS) $(CPPFLAGS) $(libboincbenchmark_a_CXXFLAGS) $(CXXFLAGS) Notice (g!!) that user's $(CXXFLAGS) is *last*. So I c

Re: adding specific C flags for a SINGLE source file

2004-12-09 Thread Bruce Allen
Alexandre, > bin_PROGRAMS = foo > foo_SOURCES = bar.c bar.h main.c > foo_CFLAGS = -some -flags > foo_LDADD = libfoo.a > noinst_LIBRARIES = libfoo.a > libfoo_a_SOURCES = foo.c foo.h > libfoo_a_CFLAGS = -some -other -flags Well, like all 'good answers' this one is

Re: adding specific C flags for a SINGLE source file

2004-12-09 Thread Alexandre Duret-Lutz
How about this proposed new entry for the FAQ? 26.7 Per-Object Flags Emulation === One of my source files needs to be compiled with different flags. How do I do? Automake supports per-program and per-library compilation flags (see *Note Program and Li

Re: adding specific C flags for a SINGLE source file

2004-12-09 Thread Stepan Kasal
Hello, On Wed, Dec 08, 2004 at 03:15:55AM -0600, Bruce Allen wrote: > There is a single routine (that lives by itself in dhrystone.C) > which must ALWAYS be compiled to an object with -O3, regardless of the > user specified compilation options, CFLAGS, CPPFLAGS, etc. I think that the easiest way

adding specific C flags for a SINGLE source file

2004-12-08 Thread Bruce Allen
Apologies if this is a FAQ: I've searched the mailing list and other standard places but not found the answer. I am working on a project which is 'stock' autoconf/automake but with one twist. There is a single routine (that lives by itself in dhrystone.C) which must ALWAYS be compiled to an object