2006-03-24 23:40:26

by evt

[permalink] [raw]
Subject: what's the right way to do this in 2.6?

I have two modules that need to share a common utility library. What I'd like to do is make the library into a .a and link each module to it. 'Twould be also nice if the modules had a dependency so the library got built automatically. Thanks for any advice.

- Eric van Tassell



2006-03-25 07:06:03

by Sam Ravnborg

[permalink] [raw]
Subject: Re: what's the right way to do this in 2.6?

On Fri, Mar 24, 2006 at 11:40:08PM +0000, [email protected] wrote:
> I have two modules that need to share a common utility library. What
> I'd like to do is make the library into a .a and link each module to it.
> 'Twould be also nice if the modules had a dependency so the library
> got built automatically. Thanks for any advice.
Drop the library idea and create a third module.
That's how this is done in several places in the kernel with success.

See Documentation/kbuild/* for how to deal with more than one module.

Sam