[lkml]   [2003]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: compiling external kernel modules (
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

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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.037 / U:5.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site