From: Kyle Hubert <khubert@cray.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kernel@vger.kernel.org, Igor Gorodetsky <igorodet@cray.com>
Subject: Re: 2.6 Makefile replacement for VPATH
Date: Thu, 25 Jun 2009 13:35:31 -0700 [thread overview]
Message-ID: <20090625203531.GO6248@cray.com> (raw)
In-Reply-To: <20090625174748.GA15168@uranus.ravnborg.org>
On Thu, Jun 25, 2009 at 07:47:48PM +0200, Sam Ravnborg wrote:
> > I refer to VPATH with regards to the situation where you can have
> > multiple Makefiles target the same source file to build different
> > objects. In particular, we are using the same source file recompiled
> > with different options to be able to support different devices.
>
> Several obvious solutions.
>
> a) Let the same driver handle multiple devices - we do this in very often.
>
> b) Keep all shared functionality in a dedicated lib* module, and
> have thin wrappers for the actual drivers. See libata for example.
Neither one of them were options for us, since header files also have
macros for defining MMR addresses in the hardware. This can change
from device to device, so the code becomes more complicated to
organize that in a shared driver/library.
> c) The ugly where you have a thin dedicated .C file for each driver
> that includes the source they share.
Thanks for the suggestion. We tried this, and it does indeed solve our
problem. It may be ugly, but it's the cleanest of the four solutions.
Thank you for the response,
-Kyle Hubert
prev parent reply other threads:[~2009-06-25 20:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 16:39 2.6 Makefile replacement for VPATH Kyle Hubert
2009-06-25 17:47 ` Sam Ravnborg
2009-06-25 20:35 ` Kyle Hubert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090625203531.GO6248@cray.com \
--to=khubert@cray.com \
--cc=igorodet@cray.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox