This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: creating 1 library from all noinst libraries in subdirs


Bob Rossi <bob_rossi@cox.net> writes:

> I have a project I am working on that uses automake. The project has
> several directories and each of them builds a noinst library.  I can
> link the library's fine to my own application which is embedded with
> the rest of the code.
>
> However, I would like to be able to export the library so other
> developers can use it ( similar to readline or ncurses ). What are my
> options?
>
> I would like to be able to tell automake all the libraries I have and
> have it create a new library containing all the object files from all
> of the noinst libraries ( Not the libraries themselves ). Is this
> possible?

Hi Bob,

I do the same here.  My Makefile.am contains the following lines:

        SUBDIRS = dir1 dir2 dir3

        lib_LIBRARIES = libfoo.a

        libfoo_a_SOURCES =
        libfoo_a_LIBADD = dir1/libfoo1.a dir2/libfoo2.a dir3/libfoo3.a

That's all.  The sub-libraries have to be built before the main
library, it's clear.

-- 
Ralph Schleicher

System Engineering
Environmental Control Systems

Liebherr-Aerospace Lindenberg GmbH
P.O. Box 1363 * 88153 Lindenberg * Germany
Phone +49-8381-46-4057 * Fax +49-8381-46-4623




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]