lkml.org 
[lkml]   [2003]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Can't build external module against 2.6.0-test6 kernel
On Tue, Oct 14, 2003 at 07:28:37AM -0400, Mark Hounschell wrote:
> Ok, I can now build it but I have to hardcode _my_ include directories in the
> Makefile like:
>
> /home/markh/work2/pcirtom_tst/driver/Makefile:
>
> EXTRA_CFLAGS = -I/home/markh/work2/pcirtom_tst/include/linux/sys
> -I/home/markh/work2/pcirtom_tst/include/linux
> -I/home/markh/work2/pcirtom_tst/include
Use:
EXTRA_CFLAGS := -I$(src)/include/linux/sys
EXTRA_CFLAGS += -I$(src)/include/linux
EXTRA_CFLAGS += -I$(src)/include

[Sidenote - you should only need the second line. Files in include/sys
should be included as:
#include <sys/file.h>

And there should be no .h files in the linux directory].

> ifneq ($(KERNELRELEASE),)
> obj-m += rtom.o
> else
> KDIR := /lib/modules/$(shell uname -r)/build
> PWD := $(shell pwd)
> default:
> $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
> endif
>
> My driver tree looks like
>
> driver/
> include/
> diags/
> samples/
> library/
>
> I've also tried setting the EXTRA_CFLAGS var in the top makefile but it
> doesn't seem to get passed down when the driver is compiled??
EXTRA_CFLAGS are only relevant for the current kbuild Makefile - so
it does not make sense to add it to the top-level Makefile.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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