libtool
[Top][All Lists]
Advanced

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

The right way to go in automake plus libtool


From: Roger Ferrer Ibanez
Subject: The right way to go in automake plus libtool
Date: Thu, 31 Jan 2008 20:20:17 +0100
User-agent: Thunderbird 2.0.0.9 (X11/20071031)

Hi,

maybe this sounds quite a naive question about using libtool in automake but I don't know how to do it right.

I have an automake project with several directories, e.g A, B, C, where A and B build both shared libraries, let's say them libA.la and libB.la. C directory creates an executable, say it C.exe. Both libraries are installed.

libB.la depends on libA.la and and C.exe depends on both libB.la (and I guess that indirectly of libA.la).

The question is, what do I have to put in Makefile.am files to make this dependency explicit? Now I'm doing this

-- A/Makefile.am
# Nothing special here
lib_LTLIBRARIES = libA.la

libA_la_SOURCES = ...

-- B/Makefile.am
lib_LTLIBRARIES = libB.la

libB_la_SOURCES = ...

libB_la_LIBADD = $(top_builddir)/A/libA.la

-- C/Makefile.am
bin_PROGRAMS = C.exe

C_exe_SOURCES = ...

C_exe_LDADD = $(top_builddir)/B/libB.la
--

This works fine all the time (both running from the build directory and from the installe executable) but libtool complains, when doing 'make install' that it has to relink "libB.la" so I suspect that this is not the proper way to go.

Is the way above right or something different has to be done in the Makefile.am ?

Thank you very much,

--
Roger Ferrer Ibáñez - address@hidden




reply via email to

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