automake
[Top][All Lists]
Advanced

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

Recompiling a source multiple times


From: Balaji, Pavan
Subject: Recompiling a source multiple times
Date: Sun, 30 Mar 2014 16:45:54 +0000

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<----

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




reply via email to

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