[Top][All Lists]

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

Re: Nesting and final linking ?

From: Ralf Wildenhues
Subject: Re: Nesting and final linking ?
Date: Tue, 5 Aug 2008 18:55:53 +0200
User-agent: Mutt/1.5.18 (2008-07-02)

Hello Nich,

* nickthefarrow wrote on Tue, Aug 05, 2008 at 12:07:35PM CEST:
> I have a project that I need to automake the build on, thats has several
> levels of directories. I automake and ./configure from the top level and a
> in each sub directory. This correctly generates a make file for
> the entire nesting.
> I'm aiming to make a single library out of this build [...]

Then what you typically do is create a convenience library in each of
the sub directories, and at the end merge them together.

--- sub/ ---
libconv_la_SOURCES = ...

--- ---
libmylib_la_SOURCES =
## yes, the previous line can be empty
libmylib_la_LIBADD = sub/ sub2/ ...

> and the current
> problem I have is that the individual object files dont seem to be linked.
> This hardly surprising as to prevent link errors I have a -c (no link)
> option for each subdirectory.

Get rid of that -c.

Hope that helps.

Alternatively, you can look into nonrecursive make setups, and do
something like

--- ---
libmylib_la_SOURCES = sub/file1.c sub2/file3.c ...


reply via email to

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