[Top][All Lists]

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

Re: How to place a lib/dll in another than defauld directory?

From: Ralf Wildenhues
Subject: Re: How to place a lib/dll in another than defauld directory?
Date: Wed, 17 Dec 2008 21:05:03 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Joost,

* Joost Kraaijeveld wrote on Wed, Dec 17, 2008 at 10:13:40AM CET:
> I have a multi-directory / multi-library project. At this moment all the
> libraries reside in their own build directory, e.g.
> $(ROOT)/platform/lib1, $(ROOT)/platform/lib2 etc. Is it possible to put
> all the libraries in a common directory instead , e.g.
> $(ROOT)/platform/lib, using Automake?

Yes, it is.  From the way you ask your question, I'm not sure whether
you want to change the build directory layout or the install directory
layout (even if you write "build directory").  For the install layout,
you can use things like
  myexecdir = $(libdir)/foo
  myexec_LTLIBRARIES =

One remark to DLLs: they are currently hard-coded to put the unversioned
DLL into $(libdir)/../bin, which may not always be desirable.

As to build tree layout:  you can for example use
  lib_LTLIBRARIES = sub/subsub/
  sub_subsub_libfoo_la_SOURCES = foo.c sub/subsub/bar.c ...

This alone may not let you achieve what you want, but you could combine
it with a non-recursive make layout; i.e., have only one for
(part of) the tree, which maybe uses 'include' to have bits from other
fragments copied into it (at 'automake' run time).

Another thing that may be worth mentioning is that, even if you have
your libraries in multiple build directories, linking against them using
something like
  bin_PROGRAMS = foo
  foo_LDADD = ../lib1/ ../lib2/

should allow for seamless execution of the uninstalled program (which
will likely have a wrapper that sets the needed library paths).  Just
in case you didn't know.

Hope that helps.


reply via email to

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