From: David Woodhouse <dwmw2@infradead.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Bernd Porr <Bernd.Porr@cn.stir.ac.uk>,
linux-kernel@vger.kernel.org, comedi@comedi.org
Subject: Re: compiling external kernel modules (comedi.org)
Date: Mon, 11 Aug 2003 14:53:14 +0100 [thread overview]
Message-ID: <1060609994.32631.3.camel@passion.cambridge.redhat.com> (raw)
In-Reply-To: <20030802230553.GA1188@mars.ravnborg.org>
On Sun, 2003-08-03 at 00:05, Sam Ravnborg wrote:
> EXTRA_CFLAGS := -I$(obj)/../include
> in the Makefile should do the trick.
Be careful -- in the case where you're building a newer driver than one
which is already in the kernel, you may need to ensure your own include
directory supersedes the kernel's. In that case 'CC=$(CROSS_COMPILE)gcc
-I$(obj)/../include' may be useful.
An example which is currently working for 2.4 and 2.6 kernels, and which
used to work for 2.2 too until quite recently, is at
http://cvs.infradead.org/cgi-bin/cvsweb.cgi/mtd/drivers/mtd/
Some people seem to think that the 'SUBDIRS=' trick is a new thing for
2.6. It's not -- it's worked for ever, and was _always_ the only
reliable way of building modules to match the kernel.
--
dwmw2
prev parent reply other threads:[~2003-08-11 13:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-02 1:04 compiling external kernel modules (comedi.org) Bernd Porr
2003-08-02 7:04 ` Sam Ravnborg
2003-08-02 11:53 ` Bernd Porr
2003-08-02 12:07 ` Sam Ravnborg
2003-08-02 13:10 ` Bernd Porr
2003-08-02 23:05 ` Sam Ravnborg
2003-08-11 13:53 ` David Woodhouse [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=1060609994.32631.3.camel@passion.cambridge.redhat.com \
--to=dwmw2@infradead.org \
--cc=Bernd.Porr@cn.stir.ac.uk \
--cc=comedi@comedi.org \
--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;
as well as URLs for NNTP newsgroup(s).