libtool
[Top][All Lists]
Advanced

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

Re: HOWTO Build one library from source in multiple subdirs?


From: Gary V . Vaughan
Subject: Re: HOWTO Build one library from source in multiple subdirs?
Date: Tue, 29 May 2001 20:36:33 +0100

On Tuesday 29 May 2001  7:14 am, Mats Lidell wrote:
> Hi Gary

Hello.

> You wrote:
>
> Gary> Don't install the convenience libraries, link against the
> Gary> uninstalled versions.  Libtool will copy the contents of the
> Gary> convenience libraries into the shared library that references
> Gary> them.
>
> This is what I'm trying to do but I don't seem to be able to swing
> it. You don't happen to have an example or pointer to an example? My
> guess is that it is the "link against the uninstalled versions" that I
> don't get right.

Off the top of my head (i.e. not tested):

foo/
  Makefile.am:
  ...
  SUBDIRS = . libfoo src
  ...
  libfoo/
    Makefile.am:
    ...
    noinst_LTLIBRARIES = libfoo.la
    libfoo_la_SOURCES  = foo.c
    ...
  src/
    Makefile.am:
    ...
    lib_LTLIBRARIES   = libbar.la
    libbar_la_SOURCES = bar.c
    libbar_LIBADD     = $(top_builddir)/libfoo/libfoo.la

    bin_PROGRAMS = baz
    baz_SOURCES  = baz.c
    baz_LDADD    = ./libbar.la
    ...

HTH,
        Gary.
-- 
  ())_.  Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/   Research Scientist  http://www.oranda.demon.co.uk        ,_())____
  / )=   GNU Hacker          http://www.gnu.org/software/libtool   \'      `&
`(_~)_   Tech' Author        http://sources.redhat.com/autobook    =`---d__/



reply via email to

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