[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake's Per-Object Flags Emulation --- CFLAGS override or just pr
From: |
Michele Martone |
Subject: |
Re: automake's Per-Object Flags Emulation --- CFLAGS override or just prepend ? |
Date: |
Sat, 9 Mar 2013 17:25:22 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On address@hidden:43, Michele Martone wrote:
> Hi,
>
> I'm using the "Per-Object Flags Emulation" functionality of automake
> to build a single library (.a) file from two .a files, each made of .o
> files compiled with different flags.
>
> In order to apply the example of
>
> http://www.gnu.org/software/automake/manual/automake.html#Per_002dObject-Flags
>
> in my Makefile.am, I declare something similar to
> libfoo_a_CFLAGS = -some -other -flags
> expecting that libfoo.a will be compiled with -some -other -flags
> rather than CFLAGS.
>
> However in the resulting Makefile I see that something like the
> following:
> libfoo_a-foo.o: foo.c
> $(CC) ... $(libfoo_a_CFLAGS) $(CFLAGS) ...
> is being generated instead.
> In other words, CFLAGS is not being replaced by libfoo_a_CFLAGS: only
> prepended: this does not seem neither what the documentation says nor
> what I need.
>
> Am I doing something wrong ?
I attach an example to illustrate the point; see the contained README file.
automake-per-object-flags-emulation-misbehaviour.tgz
Description: application/tar-gz