All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hounschell <markh@compro.net>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kernel@vger.kernel.org, dmarkh@cfl.rr.com
Subject: Re: Can't build external module against 2.6.0-test6 kernel
Date: Tue, 14 Oct 2003 14:31:08 -0400	[thread overview]
Message-ID: <3F8C40EC.FBA11955@compro.net> (raw)
In-Reply-To: 20031014174431.GA922@mars.ravnborg.org

Sam Ravnborg wrote:
> 
> 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

Thanks, defining the EXTRA-CFLAGS how and where you indicated did the trick.
Is there also now special tricks for getting a library that goes with the driver
to work? None of my IOCTLS are making it into the driver.

Ragards
Mark

      reply	other threads:[~2003-10-14 18:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-09 11:22 Can't build external module against 2.6.0-test6 kernel Mark Hounschell
2003-10-09 11:40 ` Muli Ben-Yehuda
2003-10-09 15:23 ` Sam Ravnborg
2003-10-14 11:28   ` Mark Hounschell
2003-10-14 17:44     ` Sam Ravnborg
2003-10-14 18:31       ` Mark Hounschell [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=3F8C40EC.FBA11955@compro.net \
    --to=markh@compro.net \
    --cc=dmarkh@cfl.rr.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.