automake
[Top][All Lists]
Advanced

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

Re: Recompiling a source multiple times


From: Peter Johansson
Subject: Re: Recompiling a source multiple times
Date: Mon, 31 Mar 2014 09:09:38 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 03/31/2014 02:45 AM, Balaji, Pavan wrote:
Hello,

I’m looking for a way to recompile the same source file multiple times with 
different flags and adding them into a single library.

Currently, I’m doing this:

----8<----
lib_foo_la_CPPFLAGS = -DBUILD_FOO
lib_foo_la_SOURCES = a.c b.c

lib_bar_la_CPPFLAGS = -DBUILD_BAR
lib_bar_la_SOURCES = a.c b.c
----8<----


You can merge libfoo and libbar with something like:

lib_LTLIBRARIES = libfubar.la
libyat_la_LIBADD = libfoo.la libbar.la

Very untested and confused by your underscores.

Cheers,
Peter

This builds a.c and b.c with two different flags, but creates two different 
libraries libfoo.la and libbar.la.  Is there a way to embed them into a single 
library?  The build flags already take care of eliminating duplicate symbols.

Note that doing source-specific builds will be inconvenient as the number of 
source files can be very large.

Thanks,

   — Pavan




--
Peter Johansson




reply via email to

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