Date: Sat, 17 Sep 2005 13:56:10 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: ttw@cobbled.net Cc: freebsd-drivers@freebsd.org Subject: Re: basic driver build environment Message-ID: <20050917.135610.68256548.imp@bsdimp.com> In-Reply-To: <20050917183132.GK6440@eyore.cobbled.net> References: <20050917173941.GJ6440@eyore.cobbled.net> <20050917.120027.32524785.imp@bsdimp.com> <20050917183132.GK6440@eyore.cobbled.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20050917183132.GK6440@eyore.cobbled.net> n0g0013 <ttw@cobbled.net> writes: : On 17.09-12:00, M. Warner Losh wrote: : [ ... ] : > : a. cleaner config for building modules in random : > : directory (thought '-I' to make would work but it doesn't) : [ ... ] : > When I'm developing a new module, I do the following: : > : > setenv SYSDIR /path/to/freebsd/src/sys : > make : > : > The Makefile looks like : > : > # Maybe have a .PATH here : > : > KMOD= foo : > SRCS= foo_a foo_b : > : > .include <bsd.kmod.mk> : > : > At work, we wrap setting SYSDIR in an include file, since our build : > system knows about it. : : i get the following (plus more similar) error/s : : @/sys/bus.h:456:23: device_if.h: No such file or directory : : even when setting the SYSDIR to "/usr/src/sys". perhaps i'm missing : something about the "wrap setting SYSDIR in an include file" to make : it work??? : : if i understand correctly it's looking for the kernel architecture : files from the kernel build (i.e in the 'obj' directory). : : apologies if i'm being braindamaged here. Add bus_if.h and device_if.h to your SRCS line. They are generated. If it is a pci device, you'll also need pci_if.h Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050917.135610.68256548.imp>