automake
[Top][All Lists]
Advanced

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

Linked/Shared Librairies


From: Xavier Décoret
Subject: Linked/Shared Librairies
Date: Mon, 06 Sep 2004 13:59:40 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 MultiZilla/1.5.0.3l

Hi,

Two questions. I am building a package with a convenient library that is then used by some other library/program that the package install. The base library is libbase and the Makefile.am for it looks like this:

lib_LTLIBRARIES = libbase.la
libbase.la_SOURCES = base.C

A subsequent library is libmytools and the Makefile for it is:

lib_LTLIBRARIES = libmytools.la
libmytools.la_SOURCES = mytools.C
libmytools_la_LIBADD = $(top_builddir)/base/libxdkbibtexparsers.la

First question: I would like the libmytools.so to be linked with the libbase.a so that I can distribute this .so alone without distributing libbase.so (yes, there is a good reason for doing so ;-)). How can I do this? Right now, I have AC_ENABLE_STATIC in my configure.in so both libbase.a and libbase.so gets *installed* if I do make install. But when I do make, only a libbase.la is build in $(top_builddir)/base/libxdkbibtexparsers.la. How can I tell libtool that what I want in LIBADD is a link with the static version of the lib?

Second question: because I place AC_ENABLE_STATIC in the configure.in to get libbase.a and libbase.so, then I also have both libmytools.a and libmytools.so. How can I indicate *per library* that I want both/only one of static/shared librairies?

Thanks.




reply via email to

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