Hi,

We use automake as the build system for our projects. I'm currently
stuck on one small requirement that I haven't managed to find a
resolution for. I'd like to build multiple versions of the library (with
different CFLAGS) from the same set of source files.
More precisely, this is what I'd like to do:

LIBRARIES = libfoo_a.a libfoo_b.a libfoo_c.a

libfoo_a_a_CPPFLAGS = -Dbar
libfoo_b_a_CPPFLAGS = -Dbaz
libfoo_c_a_CPPFLAGS = -Dfoobar


Until here, it's all good. But then, I don't want to mention the sources for each of the libraries separately. They are always the same, and I would like to avoid having to manually keep them in sync when stuff changes. Not to mention, the sources list and quite large and copying it around seems excessive.

Is there some way I can have a single set of sources and build multiple libraries from it with different compile flags?

Currently, I don't use libtool, but I don't mind adding that if it will make this scenario feasible.

--
aicas GmbH
Emmy-Noether-Straße 9 * D-76131 Karlsruhe * Germany
http://www.aicas.com  * Tel: +49-721-663 968-0

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Reply via email to