Add support for building modules with configured kernel options,
authorSimon Schubert <corecode@dragonflybsd.org>
Fri, 18 Feb 2005 11:41:42 +0000 (11:41 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Fri, 18 Feb 2005 11:41:42 +0000 (11:41 +0000)
commit1b29ad660b2df0cca62a4d14c62ae0816e993707
tree55348dd99dbee6cb0a649cf9bd2cced92f4684b1
parent904b437088b7257651694561fe13e24a037ef876
Add support for building modules with configured kernel options,
iff building modules with kernel.  Building modules standalone
(cd $kmoddir && make) is not affected.

This introduces an environment variable ``BUILDING_WITH_KERNEL''
which gets set to the kernel compile dir by its Makefile.
Required opt_*.h and use_*.h headers get copied from there to the
module build dir by kmod.mk.

While changing module Makefiles, clean up (slightly) incorrect
uses of kldload and kldunload (which are there for testing
purposes).

Reviewed-by: joerg
31 files changed:
sys/conf/Makefile.amd64
sys/conf/Makefile.i386
sys/conf/kmod.mk
sys/dev/crypto/hifn/Makefile
sys/dev/crypto/ubsec/Makefile
sys/dev/disk/aha/Makefile
sys/dev/disk/aic7xxx/ahc/Makefile
sys/dev/disk/trm/Makefile
sys/dev/misc/dcons/dcons/Makefile
sys/dev/netif/an/Makefile
sys/dev/netif/ie/Makefile
sys/dev/netif/snc/Makefile
sys/dev/usbmisc/ukbd/Makefile
sys/net/disc/Makefile
sys/net/ef/Makefile
sys/net/faith/Makefile
sys/net/gif/Makefile
sys/net/gre/Makefile
sys/net/pf/Makefile
sys/net/sl/Makefile
sys/net/sppp/Makefile
sys/net/stf/Makefile
sys/net/tap/Makefile
sys/net/tun/Makefile
sys/net/vlan/Makefile
sys/netgraph/iface/Makefile
sys/netproto/802_11/Makefile
sys/netproto/802_11/wlan/Makefile
sys/netproto/ncp/Makefile
sys/vfs/nwfs/Makefile
sys/vfs/smbfs/Makefile