- From: David Woodhouse <dwmw2_at_infradead.org>
- Date: Mon, 11 Aug 2003 14:53:14 +0100
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
Received on 2003-08-11Z12:53:14