Date: Wed, 17 Jul 2002 13:19:07 +0000 From: Alex Drummond <alex@abingdon74.freeserve.co.uk> To: freebsd-questions@freebsd.org Subject: Compiling kernel module Message-ID: <200207171318.24744.alex@abingdon74.freeserve.co.uk>
next in thread | raw e-mail | index | archive | help
Hi, I'm trying to get a dummy PCI driver module to compile (code mostly taken= from=20 the FreeBSD developer's handbook), and I've run into a problem with a cou= ple=20 of header files. I include the file <sys/buf.h>, and it includes the=20 following two preprocessor directives: #include "device_if.h" #include "bus_if.h" At the moment I'm compiling this module (main source file called fb.c) in= my=20 home directory using the following Makefile: ---------- # Makefile for the skeleton module SRCS =3D fb.c KMOD =3D fb =2Einclude <bsd.kmod.mk> ---------- The makefile seems to automatically create an '@' directory linking to=20 /usr/src/sys, but the two headers device_if.h and bus_if.h do not appear = in=20 this directory alongside buf.h, so there is a preprocessing error in bus.= h.=20 After a bit of diggging, I found that device_if.h and bus_if.h could be f= ound =20 a few directories further in form /usr/src/sys/compile/XXX/......, so my=20 question is, how should I set up my Makefile, etc. to allow me to build m= y=20 little module? Btw, I can compile a custom kernel no problem, so I don't think my kernel= =20 sources have got messed up. thanks, Alex To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207171318.24744.alex>