[Top][All Lists]

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

Re: creating 1 library from all noinst libraries in subdirs

From: Bob Proulx
Subject: Re: creating 1 library from all noinst libraries in subdirs
Date: Mon, 5 May 2003 10:49:32 -0600
User-agent: Mutt/1.3.28i

Schleicher Ralph (LLI) wrote:
> Bob Rossi <address@hidden> writes:
> > Is it portable to put static libraries within static libraries?
> > Or do you have to put the object files?
> Libtool automatically does the right thing (unpacking the
> sub-libraries into a temporary directory, then adding the
> object files to the main library).

So I guess that assumes that one is using libtool.  Or must use
libtool.  Or something like that.  I went back and read the thread
carefully and up until now no one had mentioned it.

> Just check it out and see what happens.

I have a similar need.  I just tried it and this was the result.  I am
not using libtool.

  ar cru libfoo.a  bar/libbar.a

  ar t libfoo.a 

Hmm...  So it seems that automake by itself does exactly what you tell
it to do here in this case.

I guess I can pretty easily write a custom rule to unpack and repack,
thinking about parallel makes and build directories, etc.  Actually I
am thinking of something along these lines.

SUBDIRS = bar baz biz

all: libfoo.a

libfoo.a: bar/*.o baz/*.o biz/*.o
        ar cru libfoo.a bar/*.o baz/*.o biz/*.o

Bob Proulx

reply via email to

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