libtool
[Top][All Lists]
Advanced

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

Re: multi part library?


From: Andreas Jellinghaus
Subject: Re: multi part library?
Date: Wed, 24 Mar 2004 12:16:49 +0100
User-agent: Pan/0.14.0 (I'm Being Nibbled to Death by Cats!)

On Wed, 24 Mar 2004 06:09:22 +0100, Ralph Schleicher wrote:
> In my projects, libA1_la_LIBADD = ../B/libB.la works as
> expected by you.  I'm using libtool 1.5 on Linux, HP-UX,
> Solaris, and Windows (MinGW).

that will dynamicaly link to libB, 
ldd libA1.so will show it uses libB.so.
I don't want that. The inidividual parts used
to create libA1.so should not be visible.

Sure, I could put all parts in one big directory,
but I don't want that. It's cleaner to split the
parts into several directories.

Also I don't want to reference C files in other directories
in the SOURCES line (which might work, too).

what I want is similar to the linux kernel:
 - in every directory compile all files, create an ar file.
 - at the end link all ar files to one big library.

In commands:

cd B/
gcc -fPIC ... -o fileB.lo fileB.c
...
ar c libB.al *.lo
cd ../A1
gcc -fPIC .. -o fileA1.lo fileA1.c
...
ar c libA1.al *.lo
gcc -shared ../libB.al libA1.al -o libA1.so

that will create one shared libary libA1.
only the one big lib is visible, it has no
dependencies on other libraries.

Is there any way I can do that with automake/libtool?

Thanks for your help.

Regards, Andreas





reply via email to

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