autoconf
[Top][All Lists]
Advanced

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

Re: Grouping header files during build


From: Ralf Wildenhues
Subject: Re: Grouping header files during build
Date: Fri, 24 Feb 2006 20:03:38 +0100
User-agent: Mutt/1.5.9i

Hi Russell,

* Russell Shaw wrote on Wed, Feb 22, 2006 at 04:33:40PM CET:
> Hi,
> I have a build tree consisting of various programs and libraries, all
> in separate subdirectories. The programs are built using these libraries.
> Both programs and libraries get installed.

Do you use libtool to create the libraries?

> When each library is built, i want to copy its header to a header-directory
> and its object to a library-directory in the buildtree so that the programs
> that get built later can include it using the gcc -I and -L options.

Why do you want to do that (honest question)?
If you have a build tree like this:
  build
  `-  lib1
  `-  lib2
  `-  prog1

you can use `-L../lib1 -llib1 -L../lib2 -llib2' for linking, or, if
using libtool, `../lib1/liblib1.la ../lib2/liblib2.la'.

> So, what is the recommended way in Makefile.am to copy a library header and
> object to another directory after a library is built?

If using libtool: that is not provided and supported.  The Libtool model
is that you have one uninstalled location and one installed location of
libraries.  It is not easy to loosen this restriction portably.

> Finally, could i also get the central library header directory and object
> directory installed in the distribution?

Well, you can use `cp' to copy around stuff, but it would really help to
know the problem to be solved from a higher-level standpoint.  We may be 
able to point out a different solution.

Cheers,
Ralf




reply via email to

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