History log of /freebsd-10.1-release/sys/conf/kmod.mk
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 265169 01-May-2014 markj

MFC r262733:
Use a full path to the target for make rules which create symlinks @,
machine and ${MACHINE_CPUARCH}. Otherwise the presence of a file named
"x86" or "x86.c" in the make path can cause problems.


# 262861 06-Mar-2014 jhb

MFC 259016,259019,259049,259071,259102,259110,259129,259130,259178,259179,
259203,259221,259261,259532,259615,259650,259651,259667,259680,259727,
259761,259772,259776,259777,259830,259882,259915,260160,260449,260450,
260688,260888,260953,261269,261547,261551,261552,261553,261585:
Merge the vt(4) driver (newcons) to stable/10.

Approved by: ray


# 259307 13-Dec-2013 ian

MFC r256492:

Add the long-missing spibus_if.m to the MFILES list.


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 253072 09-Jul-2013 avg

amd64: use -mno-omit-leaf-frame-pointer in addition to -fno-omit-frame-pointer

... in kernel builds. This is to make behavior of clang consistent with
behavior of gcc.

MFC after: 2 weeks


# 241600 15-Oct-2012 gonzo

Split sdhci driver in two parts: sdhci and sdhci_pci.
sdchi encapsulates a generic SD Host Controller logic that relies on
actual hardware driver for register access.

sdhci_pci implements driver for PCI SDHC controllers using new SDHCI
interface

No kernel config modifications are required, but if you load sdhc
as a module you must switch to sdhci_pci instead.


# 240468 13-Sep-2012 brooks

Introduce a new make variable COMPILER_TYPE that specifies what
type of compiler is being used (currently clang or gcc). COMPILER_TYPE
is set in the new bsd.compiler.mk file based on the value of the CC
variable or, should it prove informative, by running ${CC} --version
and examining the output.

To avoid negative performance impacts in the default case and correct
value for COMPILER_TYPE type is determined and passed in the environment
of submake instances while building world.

Replace adhoc attempts at determining the compiler type by examining
CC or MK_CLANG_IS_CC with checks of COMPILER_TYPE. This eliminates
bootstrapping complications when first setting WITH_CLANG_IS_CC.

Sponsored by: DARPA, AFRL
Reviewed by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>, imp, linimon
(with some modifications post review)
MFC after: 2 weeks


# 239272 15-Aug-2012 gonzo

Merging of projects/armv6, part 3

r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions. In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
* GCC to default to arm1176jz-s
* GCC to predefine __FreeBSD_ARCH_armv6__
* gas to default to ARM_ARCH_V6K
* uname -p to return 'armv6'
* make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by: Tim Kientzle <kientzle@freebsd.org>


# 238050 03-Jul-2012 obrien

Revert r222186 per instructions for FreeBSD 10.
(a 10-CURRENT share/mk is already required to build a 10-CURRENT kernel
on 9-STABLE)


# 234861 01-May-2012 adrian

Bring over the first part of the etherswitch framework - an MDIO bus and
MDIO/MII rendezvous proxy.

* Add an 'mdio' bus, which is the "IO" side of an MII bus (but by design
can be anything which implements the underlying register access API.)
* Add 'miiproxy' and 'mdioproxy', which provides a rendezvous mechanism
for MII busses to appear hanging off arbitrary busses (ie, that aren't
necessarily a traditional looking MII bus.)

MII busses can now hang off anything that implements an mdiobus.

For the AR71xx SoC, there's one MDIO bus but two MII busses. So to
properly support two or more real PHYs, this can be done:

# arge0 MDIO bus - there's no arge1 MDIO bus for AR71xx
hint.argemdio.0.at="nexus0"
hint.argemdio.0.maddr=0x19000000
hint.argemdio.0.msize=0x1000
hint.argemdio.0.order=0

# Create two mdioproxy instances
hint.mdioproxy.0.at="mdio0"
hint.mdioproxy.1.at="mdio0"

# .. and with a follow-up patch
hint.arge.0.mdio=mdioproxy0
hint.arge.1.mdio=mdioproxy0

TODO:

* Do a sweep or two and add appropriate locking in mdio/mdioproxy/miiproxy.

Submitted by: Stefan Bethke <stb@lassitu.de>
Reviewed by: ray


# 233644 29-Mar-2012 jmallett

Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the
expectations of much third-party software. MIPS builds which are little-endian
should require and exhibit no changes. Big-endian TARGET_ARCHes must be
changed:
From: To:
mipseb mips
mipsn32eb mipsn32
mips64eb mips64

An entry has been added to UPDATING and some foot-shooting protection (complete
with warnings which should become errors in the near future) to the top-level
base system Makefile.


# 232476 03-Mar-2012 dim

Revert r232473. I have been convinced by Doug Barton and Bjoern Zeeb
that it is better to error out when people attempt to build using the
wrong bsd.*.mk files, than to silently ignore the problem.

This means, that after this commit, if you want to build kernel modules
by hand (or via a port) from a head source tree, you *must* make sure
the files in /usr/share/mk are in sync with that tree. If that isn't
possible, for example when you are running on an older FreeBSD branch,
you can:

- Run "make buildenv" from your head source tree, to have the correct
environment setup. (It's advisable to have run "make buildworld", or
at a minimum "make toolchain" first.)
- Alternatively, set MAKESYSPATH to the share/mk directory under your
head source tree. If your build tools are too old, other problems may
still occur.
- Alternatively, use "make -m" and specify the share/mk directory under
your head source tree. Again, build tools that are too old may still
result in trouble.

MFC after: 2 weeks


# 232473 03-Mar-2012 dim

After r232322, it turned out many people (and some ports) are building
kernel modules using their old installed /usr/share/mk/bsd.*.mk files,
instead of the updated ones in their source tree. This leads to errors
like:

"sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang")

Obviously, these errors will go away after a "make installworld", or
alternatively, by using "make buildenv" before attempting to manually
build modules.

However, since it is apparently an expected use case to build using old
.mk files, change the way we test for clang, so it also works when the
MK_CLANG_IS_CC macro doesn't exist.

Note the conditional expressions are becoming rather unreadable now, but
I will attempt to fix that on a followup commit.

MFC after: 2 weeks


# 232322 29-Feb-2012 dim

Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

Note this does *not* disable building and installing gcc, which will
still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp. If
you want to disable gcc completely, you must use WITHOUT_GCC.

MFC after: 2 weeks


# 230308 18-Jan-2012 bz

Unbreak several mips kernel configs after r230150 and r230152 to make
a universe complete successfully again.


# 230130 15-Jan-2012 mav

Major snd_hda driver rewrite:
- Huge old hdac driver was split into three independent pieces: HDA
controller driver (hdac), HDA CODEC driver (hdacc) and HDA sudio function
driver (hdaa).
- Support for multichannel recording was added. Now, as specification
defines, driver checks input associations for pins with sequence numbers
14 and 15, and if found (usually) -- works as before, mixing signals
together. If it doesn't, it configures input association as multichannel.
- Signal tracer was improved to look for cases where several DACs/ADCs in
CODEC can work with the same audio signal. If such case found, driver
registers additional playback/record stream (channel) for the pcm device.
- New controller streams reservation mechanism was implemented. That
allows to have more pcm devices then streams supported by the controller
(usually 4 in each direction). Now it limits only number of simultaneously
transferred audio streams, that is rarely reachable and properly reported
if happens.
- Codec pins and GPIO signals configuration was exported via set of
writable sysctls. Another sysctl dev.hdaa.X.reconfig allows to trigger
driver reconfiguration in run-time.
- Driver now decodes pins location and connector type names. In some cases
it allows to hint user where on the system case connectors, related to the
pcm device, are located. Number of channels supported by pcm device,
reported now (if it is not 2), should also make search easier.
- Added workaround for digital mic on some Asus laptops/netbooks.

MFC after: 2 months
Sponsored by: iXsystems, Inc.


# 228311 06-Dec-2011 fjoe

MK_CTF is not defined when kmod.mk is used with old bsd.own.mk.


# 228158 30-Nov-2011 fjoe

- CTF knob is now implemented using common scheme: MK_CTF=yes/no is
defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF,
NO_CTF overrides WITH_CTF (used by Makefile.inc1)
- CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string
if make(1) can handle empty commands


# 228141 29-Nov-2011 fjoe

Call CTFMERGE only when WITH_CTF is defined.


# 228137 29-Nov-2011 fjoe

- fix WITH_CTF when specified in /etc/src.conf [1]
- CTFCONVERT_CMD=... is a hack (should be defined to empty string instead):
make(1) should be taught to ignore empty commands silently in compat mode
(as it does in !compat mode, GNU make also silently ignores empty commands)
and to skip printing empty commands in !compat mode
- config(8) should generate ${NORMAL_CTFCONVERT} invocation without '@':
this will allow to simplify kern.pre.mk even more and lessen the number
of shell invocations during kernel build when CTF is turned off
- WITH_CTF can now be converted to usual MK_CTF=yes/no infrastructure

Pointy hat to: fjoe [1]


# 228124 29-Nov-2011 fjoe

Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead
of executing a shell on every object or executable/library file.

This shaves off more than 30,000 shell invocations during buildworld.


# 222229 23-May-2011 imp

Test against "no" rather than "yes" for MK_KERNEL_SYMBOLS
Also, change DEBUG back to DEBUG_FLAGS in kmod.mk. The latter accidentally
snuck in with my backwards compat fix.

Submitted by: ru,gcooper


# 222186 22-May-2011 imp

Backwards compatibility hacks to allow kernels to be built via config
wihtout updating world (good transition aide for -current, but also
allows kernels to be built on -stable the old way too). This likely
should go away around FreeBSD 10.0 or so.


# 222185 22-May-2011 imp

Start to usher INSTALL_NODEBUG hack out the door. Add new
WITH{OUT,}_KERNEL_SYMBOLS (defaulting to WITH). In the fullness of
time, likely around 2020, INSTALL_NODEBUG will be removed. For now,
don't print a warning when using INSTALL_NODEBUG, but that will be
coming soon.


# 220863 19-Apr-2011 dim

Remove support for the Intel C Compiler from the build infrastructure.
This support has not worked for several years, and is not likely to work
again, unless Intel decides to release a native FreeBSD version of their
compiler. ;)


# 214629 01-Nov-2010 jhb

Add an x86/include directory to the kernel to hold headers that are common
to amd64, i386, and pc98. The headers are installed to /usr/include/x86
during an installworld, and an 'x86' symlink is created for kernel builds
similar to 'machine' so that the headers can be included as <x86/foo.h>.

Reviewed by: imp


# 212538 13-Sep-2010 imp

Use MACHINE_CPUARCH as appropriate
Define __KLD_SHARED to be yes or no depending on if the target uses shared
binaries for klds or not (this also eliminates 4 uses of MACHINE_ARCH).


# 211437 17-Aug-2010 rpaulo

For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' in
Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename
of the compiler command (excluding any arguments) is considered.

This allows you to use, for example, CC="/nondefault/path/clang -xxx",
and still have the various tests in bsd.*.mk identify your compiler as
clang correctly.

ICC if cases were also changed.

Submitted by: Dimitry Andric <dimitry at andric.com>


# 210384 22-Jul-2010 rpaulo

Handle a few corner cases for clang like we did with icc. These should
reduce the number of warnings seen while building the kernel.

Submitted by: Dimitry Andric <dimitry at andric.com>


# 210151 15-Jul-2010 imp

Simple compatibility hacks for building on older systems where
MACHINE_CPUARCH isn't defined. I believe that this will cover all
options.

I didn't define it in kern.mk because $M is set to MACHINE_CPUARCH and
then is expanded for the genassym.o rule in kern.post.mk and kern.mk
is included after this, so the expansion isn't quite right. I think
this is a bug in make, but don't have the time to track it to ground
(and even if I did, fixing it would require a MFC of the change to the
very old systems we're targetting with this fix).


# 209993 13-Jul-2010 nwhitehorn

Convert several instances of MACHINE_ARCH to MACHINE_CPUARCH and use the
correct compiler flags on 64-bit PowerPC.


# 207536 02-May-2010 mav

Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers
driver for CAM ATA subsystem. This driver supports same hardware as
atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides
many additional features, such as NCQ, PMP, etc.


# 207057 22-Apr-2010 netchild

Do the ctfmerge (= all symbols, not only symbols from one object file) for
KLDs too.

Noticed by: np


# 206082 02-Apr-2010 netchild

WITH_CTF can now be specified in src.conf (not recommended, there
are some problems with static executables), make.conf (would also
affect ports which do not use GNU make and do not override the
compile targets) or in the kernel config (via "makeoptions
WITH_CTF=yes").

Additional (related) changes:
- propagate WITH_CTF to module builds
- do not add -g to the linker flags, it's a noop there anyway
(at least according to the man page of ld)
- do not add -g to CFLAGS unconditionally
we need to have a look if it is really needed (IMO not) or if there
is a way to add it only when WITH_CTF is used

Note: ctfconvert / ctfmerge lines will not appear in the build output,
to protect the innocent (those which do not build with WITH_CTF would
see the shell-test and may think WITH_CTF is used).

Reviewed by: imp, jhb, scottl (earlier version)
Discussed on: arch@


# 205679 26-Mar-2010 netchild

Fix a typo in a comment.


# 205640 25-Mar-2010 netchild

Propagate CONF_CFLAGS (from makeoptions) to the module build too.

Discussed with: jhb (on arch@)


# 204031 18-Feb-2010 neel

Kernel module support for mips.

Reviewed by: gonzo

Tested by: Alexandr Rybalko (ray@dlink.ua)


# 194701 23-Jun-2009 rpaulo

* Driver for ACPI WMI (Windows Management Instrumentation)
* Driver for ACPI HP extra functionations, which required
ACPI WMI driver.

Submitted by: Michael <freebsdusb at bindone.de>
Approved by: re
MFC after: 2 weeks


# 188944 23-Feb-2009 thompsa

Change over the usb kernel options to the new stack (retaining existing
naming). The old usb stack can be compiled in my prefixing the name with 'o'.


# 187723 26-Jan-2009 rdivacky

kmod.mk includes bsd.sys.mk anyway so use CSTD instead of homegrown
reimplementation of the same. Note that this changes -std=c99
to -std=iso9899:1999 but those two are synonyms.

Approved by: kib (mentor)
Reviewed by: ru


# 184612 04-Nov-2008 alfred

add usb2_if.m to mfiles to unbreak build of modules.


# 183549 02-Oct-2008 bms

Allow clock_if.m to be referenced by kernel modules, this is useful
for testing that RTC drivers compile, though they generally aren't
set up for unload.


# 176800 04-Mar-2008 jhb

Force an explicit dependency on opt_global.h for all module object files
when building modules as part of a kernel build just as we do for kernel
object files.

MFC after: 1 week
Reported by: kmacy, kris
Reviewed by: ru


# 173752 19-Nov-2007 ru

Re-enable -Werror for modules.

Tested by compiling LINT (amd64 i386 ia64 pc98 powerpc sparc64 sun4v).


# 173573 12-Nov-2007 jhb

Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version was
bumped to 800004 to note the change though userland apps should not be
affected since they use <sys/agpio.h> rather than the headers in
sys/dev/agp.

Discussed with: anholt
Repocopy by: simon


# 171350 10-Jul-2007 marcel

Add --no-warn-mismatch to ld(1) when linking binary files into
ELF files. On ia64 the ELF header contains information about
characteristics of the machine code and ld(1) needs that to
determine whether input files are compatible for linking. To
this end non-ELF files are not supported by binutils on ia64.
However, the resulting ELF file seems to be correct despite the
warnings and the non-supportedness of non-ELF files and it
appears enough to unbreak the build of firmware(9) files on ia64
by simply supressing the warning.

Ran into by: gallatin@
Approved by: re (hrs)
Looks good to me: mlaier@


# 169726 19-May-2007 kan

Disable -Werror for now.
Remove -I- construct obsolete in GCC 4.2.


# 167755 21-Mar-2007 sam

Overhaul driver/subsystem api's:
o make all crypto drivers have a device_t; pseudo drivers like the s/w
crypto driver synthesize one
o change the api between the crypto subsystem and drivers to use kobj;
cryptodev_if.m defines this api
o use the fact that all crypto drivers now have a device_t to add support
for specifying which of several potential devices to use when doing
crypto operations
o add new ioctls that allow user apps to select a specific crypto device
to use (previous ioctls maintained for compatibility)
o overhaul crypto subsystem code to eliminate lots of cruft and hide
implementation details from drivers
o bring in numerous fixes from Michale Richardson/hifn; mostly for
795x parts
o add an optional mechanism for mmap'ing the hifn 795x public key h/w
to user space for use by openssl (not enabled by default)
o update crypto test tools to use new ioctl's and add cmd line options
to specify a device to use for tests

These changes will also enable much future work on improving the core
crypto subsystem; including proper load balancing and interposing code
between the core and drivers to dispatch small operations to the s/w
driver as appropriate.

These changes were instigated by the work of Michael Richardson.

Reviewed by: pjd
Approved by: re


# 167209 04-Mar-2007 flz

Fix typo in comment.

Reported by: thompsa


# 167165 02-Mar-2007 flz

- Add Intel firmwares for Intel PRO/Wireless LAN 2100/2200/2915 cards in a
uuencoded format along with their respective LICENSE files.
- Add new share/doc/legal directory to BSD.usr.dist mtree file. This is the
place we install LICENSE files for restricted firmwares.
- Teach firmware(9) and kmod.mk about licensed firmwares. Restricted firmwares
won't load properly unless legal.<name>.license_ack is set to 1, either
via kenv(1) or /boot/loader.conf.

Reviewed by: mlaier, sam
Permitted by: Intel (via Andrew Wilson)
MFC after: 1 month


# 166451 03-Feb-2007 imp

The path to the mmc/mmcbus_if.m file is wrong. Correct it by
prepending dev/

Submitted by: Andrea Bittau


# 163528 20-Oct-2006 imp

Sort MFILES list

Noticed by: ru@


# 163520 20-Oct-2006 imp

Add mmcbr_if.m and mmcbus_if.m to the mix.


# 163332 13-Oct-2006 ru

- Remove include links only when .depend is also removed, so that
"make depend; make clean; make -n" works.

- Preseve kernel's .depend if it already exists and its creation
is interrupted.

Reported/reviewed by: bde


# 161283 14-Aug-2006 des

Don't use touch when what is really meant is :> (create an empty file, or
truncate it if it exists) or :>> (ensure the file exists, but don't change
it if it already does)

Reviewed by: ru
MFC after: 2 weeks


# 160054 30-Jun-2006 jkim

Fix kernel module build breakage.


# 158979 27-May-2006 netchild

Commit the new (old) midi framework. It's based in parts on the NetBSD code,
but large parts are rewritten by matk and tanimura.

This is old code, it's not maintained since 2003. We also don't have a
maintainer for this! Yuriy Tsibizov took it and uses it in his emu10kx
driver. Since the emu10kx driver will enter the tree "soon" (some bugs
have to be fixed after Yuriy return from his holidays), I add it here
already.

This also contains some changes to emu10k1 and cmi, so if you're lucky,
you can now make some kind of use of midi with those soundcards.

To all those poor souls which don't have such a card: feel free to send
patches, we don't have a maintainer for this.

To those which miss a specific feature in the midi code: feel free to
submit patches, we don't have a maintainer for this.

Oh, did I already told that it would be nice if someone would take care
of it? Maintainer with midi equipment wanted! :-)

If you get LOR's, submit a PR and notify multimedia@ please. If you get
panics, submit a PR with a backtrace (compile the sound system into your
kernel instead of using modules in this case) and notify multimedia@
please.

Written by: matk, tanimura
Submitted by: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
Based upon: code from NetBSD


# 158124 28-Apr-2006 marcel

Rewrite of puc(4). Significant changes are:
o Properly use rman(9) to manage resources. This eliminates the
need to puc-specific hacks to rman. It also allows devinfo(8)
to be used to find out the specific assignment of resources to
serial/parallel ports.
o Compress the PCI device "database" by optimizing for the common
case and to use a procedural interface to handle the exceptions.
The procedural interface also generalizes the need to setup the
hardware (program chipsets, program clock frequencies).
o Eliminate the need for PUC_FASTINTR. Serdev devices are fast by
default and non-serdev devices are handled by the bus.
o Use the serdev I/F to collect interrupt status and to handle
interrupts across ports in priority order.
o Sync the PCI device configuration to include devices found in
NetBSD and not yet merged to FreeBSD.
o Add support for Quatech 2, 4 and 8 port UARTs.
o Add support for a couple dozen Timedia serial cards as found
in Linux.


# 155966 23-Feb-2006 marcel

Remove dev/uart/uart_if.m from the default MFILES (in kmod.mk) and
instead define MFILES appropriately for the uart(4) module build.


# 155854 19-Feb-2006 mlaier

${.CURDIR} != pwd and since we use the shell version of if now we don't even
need to prepend it.

Found-by: gallatin


# 155796 17-Feb-2006 mlaier

Use shell's version of if to check if the firmware really exists in the
current directory to allow user rules to create the firmware (e.g. from a
uuencoded blob). make's version of if is evaluated too early to catch this.

Found-by: gallatin


# 155773 17-Feb-2006 obrien

When linking make sure it succeeds.


# 155275 04-Feb-2006 imp

Fix minor inconsistancy between kernel built modules and stand-alone
built buildes. I believe this gives the same flags on the command
line for both.


# 154974 29-Jan-2006 mlaier

firmware(9) is a subsystem to load binary data into the kernel via a
specially crafted module. There are several handrolled sollutions to this
problem in the tree already which will be replaced with this. They include
iwi(4), ipw(4), ispfw(4) and digi(4).

No objection from: arch
MFC after: 2 weeks
X-MFC after: some drivers have been converted


# 152918 29-Nov-2005 ru

Drop the -I/usr/include (or any of its variants) from CFLAGS.
The sys/sys/stddef.h is here for some time now to fulfil the
kernel needs. It also was not reliable due to the exists(@)
check: in an empty module directory, "make depend; mv .depend
.depend~; make depend" ran mkdep(1) with different arguments.


# 151750 27-Oct-2005 ru

Rename the .dbg extension to .symbols, which matches "symbol-file"
gdb(1) command better, though I must admit it's confusing: these
files have not only [debugging] symbols, but much more than that.

Requested by: obrien


# 151731 27-Oct-2005 ru

Installing debug modules was a bad idea -- I bogusly assumed that
our kernel linker will only load PT_LOAD segments, apparently not.
Instead, produce .dbg objects from .debug objects, and install
them together with non-debug objects, as described in objcopy(1).

Original code by: obrien


# 151646 25-Oct-2005 ru

Refactor (some more) installation of kernel and module objects.

Try to make everyone happy: David (to have debug kernels installed
by default), Warner (to be able to override that), and myself (for
actually making it all work and to be consistent).

Now, if kernel was configured for debugging (through DEBUG=-g in
the kernel config file or "config -g"), doing "make install" will
install debug versions of kernel and module objects with their
canonical names,

kernel.debug -> /boot/kernel/kernel
if_fxp.ko.debug -> /boot/kernel/if_fxp.ko

Installing a kernel not configured for debugging, or debug kernel
with INSTALL_NODEBUG variable defined, will install non-debug
kernel and module objects.

Also, restore the install.debug and reinstall.debug targets that
are part of the existing API (they cause some additional gdb(1)
scripts to be installed).


# 151324 14-Oct-2005 ru

Get rid of duplicate -I's in CFLAGS.


# 150966 05-Oct-2005 glebius

Define HAVE_KERNEL_OPTION_HEADERS when building kernel and when building
modules along with kernel.

After this change it is possible to embrace opt_*.h includes with ifdef
HAVE_KERNEL_OPTION_HEADERS. And thus, avoid editing a lot of Makefiles
in modules directory each time we introduce a new opt_xxx.h.

Requested by: bde


# 150327 19-Sep-2005 ru

Fix genassym.o dependencies.


# 149863 07-Sep-2005 obrien

Use the more readable empty() syntax.


# 145404 22-Apr-2005 ru

Revert a mistake borrowed from kern.post.mk that has just been fixed.


# 145396 22-Apr-2005 iedowse

Add rules for building assym.s.


# 145292 19-Apr-2005 obrien

I accidently committed two 'cleandepend' when I was deciding which
form was "cleaner".


# 145248 18-Apr-2005 obrien

As with kernel-depend, rm the DEPENDFILE before modules-depend.


# 144906 11-Apr-2005 mux

Use comments after .endif to please make(1) with latest changes so
that it's possible to build a kernel without getting flooded with
thousands of warnings.


# 144562 03-Apr-2005 imp

Don't forget to create new-style links for module builds.

Forgotten by: imp@
Reminded by: nyan@


# 144330 30-Mar-2005 sos

This is the much rumoured ATA mkIII update that I've been working on.

o ATA is now fully newbus'd and split into modules.
This means that on a modern system you just load "atapci and ata"
to get the base support, and then one or more of the device
subdrivers "atadisk atapicd atapifd atapist ataraid".
All can be loaded/unloaded anytime, but for obvious reasons you
dont want to unload atadisk when you have mounted filesystems.

o The device identify part of the probe has been rewritten to fix
the problems with odd devices the old had, and to try to remove
so of the long delays some HW could provoke. Also probing is done
without the need for interrupts, making earlier probing possible.

o SATA devices can be hot inserted/removed and devices will be created/
removed in /dev accordingly.
NOTE: only supported on controllers that has this feature:
Promise and Silicon Image for now.
On other controllers the usual atacontrol detach/attach dance is
still needed.

o Support for "atomic" composite ATA requests used for RAID.

o ATA RAID support has been rewritten and and now supports these
metadata formats:
"Adaptec HostRAID"
"Highpoint V2 RocketRAID"
"Highpoint V3 RocketRAID"
"Intel MatrixRAID"
"Integrated Technology Express"
"LSILogic V2 MegaRAID"
"LSILogic V3 MegaRAID"
"Promise FastTrak"
"Silicon Image Medley"
"FreeBSD PseudoRAID"

o Update the ioctl API to match new RAID levels etc.

o Update atacontrol to know about the new RAID levels etc
NOTE: you need to recompile atacontrol with the new sys/ata.h,
make world will take care of that.
NOTE2: that rebuild is done differently from the old system as
the rebuild is now done piggybacked on read requests to the
array, so atacontrol simply starts a background "dd" to rebuild
the array.

o The reinit code has been worked over to be much more robust.

o The timeout code has been overhauled for races.

o Support of new chipsets.

o Lots of fixes for bugs found while doing the modulerization and
reviewing the old code.

Missing or changed features from current ATA:

o atapi-cd no longer has support for ATAPI changers. Todays its
much cheaper and alot faster to copy those CD images to disk
and serve them from there. Besides they dont seem to be made
anymore, maybe for that exact reason.

o ATA RAID can only read metadata from all the above metadata formats,
not write all of them (Promise and Highpoint V2 so far). This means
that arrays can be picked up from the BIOS, but they cannot be
created from FreeBSD. There is more to it than just the missing
write metadata support, those formats are not unique to a given
controller like Promise and Highpoint formats, instead they exist
for several types, and even worse, some controllers can have
different formats and its impossible to tell which one.
The outcome is that we cannot reliably create the metadata of those
formats and be sure the controller BIOS will understand it.
However write support is needed to update/fail/rebuild the arrays
properly so it sits fairly high on the TODO list.

o So far atapicam is not supported with these changes. When/if this
will change is up to the maintainer of atapi-cam so go there for
questions.

HW donated by: Webveveriet AS
HW donated by: Frode Nordahl
HW donated by: Yahoo!
HW donated by: Sentex
Patience by: Vife and my boys (and even the cats)


# 141700 11-Feb-2005 ru

Further embellish rev. 1.180: protect against -fno-strict-aliasing
being already in CFLAGS (as is the case with "make buildkernel").

NB: rev. 1.180 is only needed due to a broken setting of CFLAGS in
tinderbox.


# 141560 09-Feb-2005 obrien

Emblish rev 1.180 to -fno-strict-alias w/-Os & -O3 also.


# 141243 04-Feb-2005 njl

Hook up the cpufreq framework, acpi_perf(4), and cpufreq(4) drivers.


# 141158 02-Feb-2005 grehan

Don't lose the frame pointer for PPC modules: backtrace doesn't work.


# 140877 26-Jan-2005 imp

Add required ing


# 140876 26-Jan-2005 imp

Add -fno-strict-alias whenever someone is compiling with -O2,
unconditionally.


# 140866 26-Jan-2005 imp

Generally force -Werror for modules when not compiling with icc. This
has burned me for the last time.


# 139758 06-Jan-2005 grehan

Modules on PPC need to be compiled with -mlongcall to get around
the +/-64k blr offset limitation. With gcc bug #12769 fixed, it's
time to put enable this.


# 139460 30-Dec-2004 imp

Remove special case from *devs2h loop for usb
Move usb out of the loop since the other devs2h programs don't grok -h
Add new rule for usbdevs_data.h


# 138545 08-Dec-2004 ru

Properly handle vnode_if.h dependencies, and don't forget to clean all files.


# 138534 08-Dec-2004 green

Unbreak KLDs that use VFS by accounting for changes in the generation
process for the vnode header files.


# 138370 04-Dec-2004 marius

Revert rev. 1.166 and remove sparc64/pci/ofw_pci_if.m from MFILES again,
sparc64/pci/ofw_pci.h is no longer required for compiling modules.


# 137934 20-Nov-2004 marcel

Sort MFILES.


# 136855 24-Oct-2004 ru

Hack around a problem with sys/tools/usbdevs2h.awk that generates
both usbdevs.h and usbdevs_data.h. (The latter was not cleaned.)


# 136436 12-Oct-2004 ru

Back out cumulative changes from revs. 1.92-1.94: "make depend"
followed by "make depend" shouldn't do anything. It doesn't
seem to be a problem anymore, and if someone finds it to break
again, please contact me so we can work on a real fix.

Reviewed by: bde


# 136435 12-Oct-2004 ru

Style fixes, including:

- Sort kmod.mk knobs in the documentation section.
- Fixed misuses of the word "KLD" which stands for
"kernel ld", or "kernel linker", where kernel
module is meant.
- Removed redundant uses of ${.OBJDIR}.
- Whitespace and indentation fixes.
- CLEANFILES cleanup.
- Target redefinition protection (install.debug).

Submitted by: bde, ru
Reviewed by: ru, bde


# 136400 11-Oct-2004 joerg

Revert the change from rev 1.168. ru convinced me that the situation
that was fixed by this should not normally happen, and since I did not
record the traces of my failed build attempt that had been solved with
that change, it's not entirely clear whether it hadn't been a pilot
error on my end. In dubio pro reo. :-)


# 136311 09-Oct-2004 joerg

Forcibly create symlinked headers, otherwise the build process may fail
if the target link already existed (e. g. -DNO_KERNELCLEAN).


# 134463 29-Aug-2004 iedowse

Unconditionally add `-fno-omit-frame-pointer' to CFLAGS when building
modules on the amd64 platform. Without this, ddb stack traces cannot
follow module function calls, which makes debugging very difficult.


# 133734 14-Aug-2004 marius

Add sparc64/pci/ofw_pci_if.m to the list of MFILES so modules can use
sparc64/pci/ofw_pci.h. This is a bit messy right now but (hopefully) will
get better once the MI OFW PCI code has moved from sparc64/pci to dev/ofw.


# 133653 13-Aug-2004 ru

Removed COPTS support from kmod.mk and kern.pre.mk.
COPTS support in bsd.prog.mk is preserved but discouraged.


# 133589 12-Aug-2004 marius

- Introduce an ofw_bus kobj-interface for retrieving the OFW node and a
subset ("compatible", "device_type", "model" and "name") of the standard
properties in drivers for devices on Open Firmware supported busses. The
standard properties "reg", "interrupts" und "address" are not covered by
this interface because they are only of interest in the respective bridge
code. There's a remaining standard property "status" which is unclear how
to support properly but which also isn't used in FreeBSD at present.
This ofw_bus kobj-interface allows to replace the various (ebus_get_node(),
ofw_pci_get_node(), etc.) and partially inconsistent (central_get_type()
vs. sbus_get_device_type(), etc.) existing IVAR ones with a common one.
This in turn allows to simplify and remove code-duplication in drivers for
devices that can hang off of more than one OFW supported bus.
- Convert the sparc64 Central, EBus, FHC, PCI and SBus bus drivers and the
drivers for their children to use the ofw_bus kobj-interface. The IVAR-
interfaces of the Central, EBus and FHC are entirely replaced by this. The
PCI bus driver used its own kobj-interface and now also uses the ofw_bus
one. The IVARs special to the SBus, e.g. for retrieving the burst size,
remain.
Beware: this causes an ABI-breakage for modules of drivers which used the
IVAR-interfaces, i.e. esp(4), hme(4), isp(4) and uart(4), which need to be
recompiled.
The style-inconsistencies introduced in some of the bus drivers will be
fixed by tmm@ in a generic clean-up of the respective drivers later (he
requested to add the changes in the "new" style).
- Convert the powerpc MacIO bus driver and the drivers for its children to
use the ofw_bus kobj-interface. This invloves removing the IVARs related
to the "reg" property which were unused and a leftover from the NetBSD
origini of the code. There's no ABI-breakage caused by this because none
of these driver are currently built as modules.
There are other powerpc bus drivers which can be converted to the ofw_bus
kobj-interface, e.g. the PCI bus driver, which should be done together
with converting powerpc to use the OFW PCI code from sparc64.
- Make the SBus and FHC front-end of zs(4) and the sparc64 eeprom(4) take
advantage of the ofw_bus kobj-interface and simplify them a bit.

Reviewed by: grehan, tmm
Approved by: re (scottl)
Discussed with: tmm
Tested with: Sun AX1105, AXe, Ultra 2, Ultra 60; PPC cross-build on i386


# 131276 29-Jun-2004 njl

Add acpi methods for HID/CID probing, evaluating objects, and walking the
namespace. This is to allow decoupling of attachments from ACPI where they
need some functionality when ACPI is present but do not want to require ACPI
to always be loaded.


# 131038 24-Jun-2004 njl

Hook acpi_quirks up to the build for kernel and modules.


# 130416 13-Jun-2004 mlaier

Link ALTQ to the build and break with ABI for struct ifnet. Please recompile
your (network) modules as well as any userland that might make sense of
sizeof(struct ifnet).
This does not change the queueing yet. These changes will follow in a
seperate commit. Same with the driver changes, which need case by case
evaluation.

__FreeBSD_version bump will follow.

Tested-by: (i386)LINT


# 130274 09-Jun-2004 imp

Step 1 in moving EISA devices to kobj/newbus. Use kobj methods for
all of the interface between the driver and the bus. This will enable
us to stop special casing eisa bus attachments in modules and treat them
like we treat all other busses.

In the longer run, we need to eliminate much (all?) of these interfaces
and switch to using the standard bus_alloc_resource(), but that's not
done right now.

# I've not updated the modules to include eisa, etc, just yet

Tested on: Compaq Proliant 3000/333 purchased for eisa work


# 129740 25-May-2004 imp

Move to generating pccarddevs.h on the fly, both for the kernel and
the modules.

Also generate usbdevs.h automatically now, but a non-kernel file is
stopping that at the moment.


# 129738 25-May-2004 imp

devlist2h.awk is too generic a name for what it does. It really
converts miidevs to a .h file, so rename to reflect that.

The usb and pccard versions have also been renamed and will be hooked
into the build system shortly (I've made the conversion in my p4
tree).


# 129283 16-May-2004 peter

Enable first part of kld's on amd64. This is known to not work right
yet, but building kld's is OK now and they can be loaded by kldload(2).
(but the machine will likely crash soon afterwards, a "minor" problem :-)

Brought to you by: my injured knee (from moving)


# 126938 13-Mar-2004 trhodes

Fix some style bugs in previous commit.
Fix 'broken' ifdefs.
icc does not support profiling yet so remove unfinished code which was
supposed to help.

Submitted by: netchild (original version)
Reviewed by: ru


# 126890 12-Mar-2004 trhodes

This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.

The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.

Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.

To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.

Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.

Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by: silence on -arch
Submitted by: netchild


# 126699 06-Mar-2004 ru

Overdue reversion of revision 1.143.

OK'ed by: imp


# 125772 13-Feb-2004 ru

Reduce the number of knobs controlling the build of debug modules
to one, DEBUG_FLAGS, which is also compatible with <bsd.prog.mk>.
Previously one had to set both DEBUG and DEBUG_FLAGS to build the
.ko.debug with debugging symbols which was boring when doing this
manually.


# 125770 13-Feb-2004 ru

We didn't strip debugging symbols from .ko if DEBUG was undefined.


# 123830 25-Dec-2003 ru

Don't add CWARNFLAGS to CFLAGS here, they were already added by bsd.sys.mk.


# 122894 19-Nov-2003 imp

o Remove @- from the ln and change it to a -sf. This was bogus, and
regocnized as such at the time. Now that the other bogons in the
tree have been fixed, we can remove this ugly kludge.
o Remove stale/bogus opt_foo.h files. These are left over from
by-gone resources. And they point to the need, yet again, to
improve the build system so meta information is only in one place.

Submitted by: ru
Reviewed by: bde
Approved by: re@ (jhb)


# 122837 17-Nov-2003 imp

Ignore errors on ln. This is a quick fix for the make depend twice in
a row being broken. A better filx will come as soon as I have time to
analyse things more deeply.


# 122788 16-Nov-2003 green

As mentioned by warner, previous revision (opt_ddb.h) was just a fluke --
I'm having bad luck with different parts of the sys tree being checked
out at slightly different times. Back it out, noting it doesn't cause
harm in any case. Tinderbox also makes these things more fun.


# 122786 16-Nov-2003 green

It appears opt_global.h may cause opt_ddb.h to be needed. Adding it
with the full path on the command line like with -include opt_global.h
currently unbreaks tinderbox.


# 122773 15-Nov-2003 imp

Fix the building of null module. In the DIAGNOSTICS case, we include
opt_ddb.h. These changes expand green's work of including
opt_global.h to prefer opt files in the kernel directory. Further
refinement might be needed, but I think this is good.

Note: While this is a step on the path to moving the meta information
about modules into the config files, it doesn't actually do that. It
just pulls in the opt files in a way that allows one to build
'generic' modules outside the tree.


# 122672 14-Nov-2003 green

Include opt_global.h in the modules build, when building from a normal
kernel build. This makes it possible for me not to get pissed off that
random.ko crashes the system trying to rdtsc() when the i386/cpu.h
support code decides it's okay to call that op when neither I386_CPU or
I486_CPU is defined. I guess it also makes WITNESS/INVARIANTS defines
get picked up by the modules.


# 122085 04-Nov-2003 peter

Move the inline limit default variable to a per-arch place. For example,
the amd64 implementation of the pcpu macros is even more verbose than on
i386 and that causes gcc to way overestimate the complexity of this
2-instruction macro. The other platforms can probably lower their
default values.


# 120720 03-Oct-2003 imp

While make has been fixed to grok this construct, the new make hasn't
been widely deploy and that's causing us a lot of pain. Back out the
last commit for a few weeks so that we can lessen the support load in
current@ asking why they can't build kernels anymore. Instructions in
UPDATING have been updated, but this should be more effective.

Revert the reverting: November 1st, 2003


# 120677 02-Oct-2003 ru

Revert rev. 1.86, I've fixed make(1) (make/dir.c,v 1.32).

PR: bin/34062


# 119816 06-Sep-2003 marcel

Hook-up the uart(4) driver to the build. For a detailed description
of what uart(4) is and/or is not see the initial commit log of one
of the files in sys/dev/uart (or see share/man/man4/uart.4).

Note that currently pc98 shares the MD file with i386. This needs
to change when pc98 support is fleshed-out to properly support the
various UARTs. A good example is sparc64 in this respect.

We build uart(4) as a module on all platforms. This may break
the ppc port. That depends on whether they do actually build
modules.

To use uart(4) on alpha, one must use the NO_SIO option.


# 119307 22-Aug-2003 imp

Now that the pci include file location migration has been completed,
remove the -I$S/dev and -I@/dev which were there only for pci.

# If I've broken something, please let me know.


# 118036 26-Jul-2003 peter

Change the inline limit switch to something that exists in gcc-3.2.
Unfortunately, it has different units.


# 117930 23-Jul-2003 peter

Provide a knob for raising the inline instruction estimate threshold and
set an initial value. This is aimed at getting us closer to being able to
turn -Werror back on and we can adjust the settings later on. Yes, we
could turn off -Wno-inline instead, but that would hide the effect of
gcc's bogo-estimator ignoring inline (either rightly or wrongly).


# 111851 03-Mar-2003 ru

exists() is too aggressive when searching for files without a full path.

Inspired by: bsd.prog.mk,v 1.105


# 111686 28-Feb-2003 ru

Initiate the de-orbit burn sequence for <bsd.kern.mk>.
Always use sys/conf/kern.mk when building kernel/modules.
<bsd.kern.mk> is only preserved for sys/boot/pc98/boot2
for now, but this will be fixed. If there are other
users of <bsd.kern.mk>, please let me know.

Reminded by: bde


# 110285 03-Feb-2003 nyan

Add CanBe power management controller support.

Submitted by: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>


# 109617 21-Jan-2003 jake

Run kldxref on sparc64, it works now.


# 109514 19-Jan-2003 obrien

Remove miidevs.h and generate it from miidevs at compile time.
The devlist2h.awk tool to do this has been repocopied to sys/tools/.


# 107804 12-Dec-2002 jake

Don't run kldxref when installing modules on sparc64. kldxref and the whole
module dependency system rely on linker behaviour that is machine dependent
and not part of the elf spec, and only work by accident on other platforms.

Approved by: re


# 106511 06-Nov-2002 mux

In the !DEBUG case, we were passing foo.ko two times on the
rm -f command line when doing a make clean. Fix this.

Reviewed by: ru


# 104485 04-Oct-2002 sam

add crypto interface to the MFILES list


# 103436 16-Sep-2002 peter

Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha


# 100872 29-Jul-2002 ru

Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by: bde


# 100229 17-Jul-2002 ru

Handle installation of links through bsd.links.mk.
Removed comments that no longer directly apply here.


# 99772 11-Jul-2002 ru

Do not override the standard `distribute' target that is currently
available from bsd.obj.mk.

The native version was identical (and pretty much unused except in
the -DMODULES_WITH_WORLD case, which it is not for "make release")
except that the "bin" -> "base" change of the default DISTRIBUTION
name did not propagate here.


# 98354 17-Jun-2002 n_hibma

Use OBJDIR instead of CURDIR. This unbreaks loading modules through
'make load' if an object dir was, like it is used in /sys/modules. I.e.

cd /sys/modules/umass
make obj
make
make load

works again without having to install the module.

If no objdir was used the module in the current directory is used.


# 96566 14-May-2002 ru

Check that kldxref(8) exists before running it.


# 95880 01-May-2002 imp

We don't need no stinkin' echos here.

Instead, don't run kldxref if you don't have one on your system.


# 95844 01-May-2002 obrien

Use makeobjops.awk rather than makeobjops.pl.
(with big thanks to Oliver Fromme <olli@fromme.com>)


# 95835 30-Apr-2002 peter

Catch any stray KMODDEPS entries to make sure they do not keep turning up.


# 95704 29-Apr-2002 obrien

Barrow something from the `nmap' port to help the ENOCLUE people upgrading
from releng4 and are not able to properly read make(1) output.


# 95356 24-Apr-2002 ru

The install.debug and reinstall.debug targets are needed solely
to build kernel and kernel modules so stop supporting them in
bsd.subdir.mk and reimplement them in kern.post.mk and kmod.mk
as special versions of the install and reinstall targets, and
only define them if DEBUG is also defined (when debug versions
are really built).

Prompted by: bde


# 95306 23-Apr-2002 ru

Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.

Ensure all standard targets honor SUBDIR. Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents). Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk. Nothing depended on the wrong
order anyway.

Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.

De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)


# 95265 22-Apr-2002 ru

Back out remnants of revision 1.97: we don't need TARGET_ARCH here.


# 95263 22-Apr-2002 ru

Use standard bsd.init.mk prologue.


# 92553 18-Mar-2002 ru

lint the previous lint commit.

Reviewed by: markm


# 92491 17-Mar-2002 markm

Allow "make lint" to mostly work. Our sources are very unclean WRT
lint, so this is turned off by default. Setting WANT_LINT will turn
on generation of lint libraries for /usr/libdata/lint/*.ln.

Reviewd by: silence in -audit.


# 91512 28-Feb-2002 obrien

Use vnode_if.awk rather than vnode_if.pl


# 89260 11-Jan-2002 ru

Drop <bsd.man.mk> support from <bsd.kmod.mk>.

Not objected to by: -current


# 89243 10-Jan-2002 msmith

Reverse the sense of EXPORT_SYMS. If EXPORT_SYMS is not
defined, no symbols are exported from the module. This is
the typical configuration for most device drivers and
standalone modules; only infrastructure modules or those with
special requirements typically need to export symbols.

Don't print the objcopy commands as they are run when converting
symbols; they're bulky and annoying in many cases.


# 89180 10-Jan-2002 msmith

Eliminate the use of commons in the kernel and modules,
simplifying the module linking process and eliminating the risks
associated with doubly-defined variables.

Cases where commons were legitimately used (detection of
compiled-in subsystems) have been converted to use sysinits, and
any new code should use this or an equivalent practice as a
matter of course.

Modules can override this behaviour by substituting -fno-common
out of ${CFLAGS} in cases where commons are necessary
(eg. third-party object modules). Commons will be resolved and
allocated space when the kld is linked as part of the module
build process, so they will not pose a risk to the kernel or
other modules.

Provide a mechanism for controlling the export of symbols from
the module namespace. The EXPORT_SYMS variable may be set in the
Makefile to NO (export no symbols), a list of symbols to export,
or the name of a file containing a newline-seperated list of
symbols to be exported. Non-exported symbols are converted to
local symbols. If EXPORT_SYMS is not set, all global symbols are
currently exported. This behaviour is expected to change (to
exporting no symbols) once modules have been converted.

Reviewed by: peter (in principle)
Obtained from: green (kmod_syms.awk)


# 85570 26-Oct-2001 des

Support the "install.debug" and "reinstall.debug" targets for kernel modules.
Small tweaks to kldxref may be necessary to avoid the surprising (but harm-
less) behaviour of 'kldload foo' loading foo.ko.debug instead of foo.ko if
it is present in the kernel directory.

Approved by: a week of silence on -arch
MFC after: 2 weeks


# 83323 10-Sep-2001 peter

On second thoughts, make kldxref failures non-fatal.


# 83321 10-Sep-2001 peter

Implement the long-awaited module->file cache database. A userland
tool (kldxref(8)) keeps a cache of what modules and versions are inside
what .ko files. I have tested this on both Alpha and i386.

Submitted by: bp


# 81289 08-Aug-2001 green

In the KLD "load" make target, don't load using the "absolute" path of
"./foo.ko". Use "/full/path/foo.ko" instead so that when the path is
reported as being an absolute path to the "shared library", at least
it's not really a relative path.

Obtained from: LOMAC/FreeBSD project


# 81031 02-Aug-2001 sheldonh

When building a debugging kernel with modules, build modules with
debugging support as well. Debugging module support is handled
identically to kernel debugging support, right down to poor
choice of make variable names.


# 79856 18-Jul-2001 roam

Make sure that installing a module complains if the target modules
directory does not exist, instead of creating/overwriting a file
with the name of the (expected) directory. Yes, this deviates a bit
from nearly all other install targets in the tree, but let's face it,
removing a modules directory is not all that uncommon a mistake,
and finding a file with the contents of the last module installed
is a baaad surprise at boot time..

PR: 26317
Submitted by: "T. William Wells" <bill@twwells.com> (the PR)
Gregory Bond <gnb@itga.com.au> (the actual patch)
Reviewed by: silence on -arch and -audit for the last 10 days
MFC after: 2 weeks


# 78161 13-Jun-2001 peter

With this commit, I hereby pronounce gensetdefs past its use-by date.

Replace the a.out emulation of 'struct linker_set' with something
a little more flexible. <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.

The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).

The macros declare a strongly typed set. They return elements with the
type that you declare the set with, rather than a generic void *.

For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.

For a.out, we use the old linker_set struct.

NOTE: the item lists are no longer null terminated. This is why
the code impact is high in certain areas.

The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.

linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.

Reviewed by: eivind


# 75984 25-Apr-2001 obrien

Don't install KO's with the "schg" flag.
We are way too inconsistent with our setting of the "schg" flag, and in
our default install, it doesn't really offer any additional security.

Reviewed by: arch@


# 75332 09-Apr-2001 bp

Add function prototypes and base module for kernel side iconv library.
Add simple "xlat" converter which performs 8to8 table based conversion.
Unicode converter will be added in the near future.

Reviewed by: silence on arch@
Files placement reviewed by: bde
Obtained from: smbfs


# 74849 27-Mar-2001 ru

Reflect recent bsd.man.mk changes here, but do not assign the
default MAN=${KMOD}.4 value for now. This feature was broken
before, and enabling it now would cause 92 Makefiles to fail.


# 74739 24-Mar-2001 obrien

Cleaner way of adding -fschg (ie, correctly implement).
"INSTALLFLAGS" belongs to individual Makefiles.
"_INSTALLFLAGS" is for global additions.

Submitted by: bde


# 73598 05-Mar-2001 imp

Move beforedepend: outside of the loop.

# Note: we should remove the rm kludge soon. It fails in many cases.

Submitted by: bde


# 73419 04-Mar-2001 obrien

Set TARGET_ARCH and install files -fschg as we do the kernel module.


# 73118 26-Feb-2001 peter

Add pci/agp_if.m to the MFILES list so that we can auto depend on agp_if.h


# 72935 23-Feb-2001 imp

If the symbolic links @ or machine exist, do not depend on them.

This fixes the problem where if src/sys or src/sys/$MACHINE_ARCH/include
changed at all, all the modules would be rebuilt.

Reviewed by: bde


# 72754 20-Feb-2001 peter

This time really fix the machine/lock.h thing. This time don't fool make
into thinking that the way to build a .o file is to "rm -f .depend".

Suggested by: imp


# 72704 19-Feb-2001 peter

Back out rev 1.92


# 72672 18-Feb-2001 peter

"Fix" the machine/lock.h problem in modules depend with a sledge hammer.
This forces bsd.dep.mk to rebuild the .depend file.


# 72560 17-Feb-2001 marcel

Revert gensetdefs.pl reversal.


# 71751 28-Jan-2001 marcel

Revert previous commit. I messed up my testing.


# 71729 28-Jan-2001 marcel

Improve kernel bootstrapping:
o Use objdump instead of gensetdefs(1) to build the linker sets.
o Allow overriding of nm and objdump in resp. genassym.sh and
gensetdefs.pl for non-native toolchains.

Reviewed by: arch
Perl improvements: Jos Backus <josb@cncdsl.com>, benno


# 70134 17-Dec-2000 cg

kobjify.

this gives us several benefits, including:

* easier extensibility- new optional methods can be added to
ac97/mixer/channel classes without having to fixup every driver.

* forward compatibility for drivers, provided no new mandatory methods are
added.


# 69784 08-Dec-2000 msmith

Next-phase PCI system update; move PCI core code to sys/dev and update
header include path to include sys/dev to avoid massive #include updates.


# 69775 08-Dec-2000 jasone

Do not check for existence of ${_dir}/kern/ , because for modules that set
.PATH to ${.CURDIR}/[...]/kern , the "exists" expression will fail for the
form exists(${.CURDIR}/[...]/kern/). This appears to be happening because
make is searching for the argument to "exists" by using .PATH rather than a
relative search, because .PATH and the argument match at the beginning.
Additionally, make appears to consider a path that starts with ${.CURDIR}
as relative, even though it expands to an absolute path.

The reason that most people aren't seeing this problem is that the absolute
paths of /usr/src/sys and /sys are also searched, so as long as the kernel
source can be found in at least one of those places, no problems surface.
This problem was inadvertently introduced on 1 December 2000, with the
addition of the sysvipc modules.


# 68027 31-Oct-2000 takawata

Add pcib_if location to list of *.m files.


# 67861 29-Oct-2000 phk

Add a hook for doing #include magic (for src/tools/tools/kerninclude).


# 65501 05-Sep-2000 obrien

The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.


# 61928 22-Jun-2000 cokane

Fix the 'file not found' in the load target, someone
forgot to add the '.ko' to the end of the module filename.


# 59859 01-May-2000 peter

Forced commit: Rev 1.80 also changes the gensetdefs point of execution
so that it gets run after the .kld file generation. If it's run before,
the linker sets are closed off and bound inside the .kld file which makes
it useless for binding into a static kernel as the linker_set's will not
be connected...


# 59858 01-May-2000 peter

Remove KMODDEPS support. All our existing dependencies are specified
via the MODULE_VERSION() and MODULE_DEPEND() macros that both the loader
and kld system know how to deal with. The old DT_NEEDED tag is still
supported by the loader (and will remain supported for a while) - but the
kernel side presently doesn't know how to deal with DT_NEEDED.


# 59097 08-Apr-2000 imp

Add support for compiling kernel modules outside of the tree. If you
do not have the kernel you wish to compile against in either
/usr/src/sys or /sys, then you will need to set SYSDIR to point to the
sys directory of the source tree that contians the source.

Also, minor tweaks to the load/unload targets from Bruce.

I've had this through several make worlds, as well as using it on a
daily basis for the past couple of weeks to build modules needed for
testing at Timing Solutions.

Reviewed and revised by: bde
Work sponsored by: Timing Solutions


# 59094 08-Apr-2000 dfr

Use makeobjops.pl instead of makedevops.pl.


# 59032 05-Apr-2000 dfr

Allow the calling Makefile to specify a list of device interfaces instead
of relying on the default list provided here.


# 58321 19-Mar-2000 peter

Use an intermediate file containing the module binary before converting
it into a ``shared'' .ko file. This intermediate file can be directly
linked into a static kernel. This isn't all that useful yet but will
become much more interesting shortly.


# 56735 28-Jan-2000 bde

Add ${DEBUG_FLAGS} to CFLAGS in bsd.kmod.mk, not in scattered module
makefiles. Bad examples in fxp/Makefile keep getting copied to new
makefiles.


# 56665 27-Jan-2000 peter

Forced commit; should be no changes except the $FreeBSD$ line. I'm
forcing this because of hints of 'cvs wierdness' that might have caused
the ppbus_if.m errors for a few folks.


# 56464 23-Jan-2000 peter

oops, nearly forgot to commit the addition of ppbus_if.m to the list.


# 55624 08-Jan-2000 bde

Add "-I@/../include" and/or "-I${DESTDIR}/usr/include" to CFLAGS,
essentially as in kernel makefiles, so that module sources can include
<stddef.h> and other standard headers. Only add the second path when
the first path can't be found, instead of when DESTDIR is defined.
Adding it used to be just an obfuscation.

Use "${.OBJDIR}" instyead of "." in -I paths. Using "${.OBJDIR}" just
gave more verbose command lines and depend files.


# 55206 29-Dec-1999 peter

Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot). This is consistant with the other
BSD's who made this change quite some time ago. More commits to come.


# 54978 21-Dec-1999 peter

Update vnode_if.sh location. This was deliberately left a while after
the repo copy as the kernel src/sys/modules stuff uses
/usr/share/mk/bsd.kmod.mk which often gets out of sync with the kernel
source.


# 54501 12-Dec-1999 peter

Use the -c and -h args of vnode_if.sh to generate only the .h file that
we use. The .c half is statically compiled into the kernel. It's kinda
silly to generate a .h file on the fly that has inlines to call the
.c stuff when the .c code is fixed.

Also, zap the special treatment for VFS_KLD modules. This treatment
applies to lots of things, not just VFS's.


# 53848 28-Nov-1999 imp

Add two modules for the pccard work: dev/pccard/card_if.m and
dev/pccard/power_if.m.

XXX There has got to be a better way to deal with this.


# 53843 28-Nov-1999 bde

Build and clean device interface files (foo_if.[ch]) and empty options
files (opt_*.h) automatically (if they are in ${SRCS}).

Clean vnode_if.[ch] automatically (if one of them is in ${SRCS}, not just
if VFS_KLD is defined).

There are some complications to avoid using the "@" symlink before it
is built.


# 53638 23-Nov-1999 marcel

Add .ORDER which is needed for the previous commit to work with -jN.

Pointed out by: bde


# 53628 23-Nov-1999 marcel

vnode_if.sh makes both vnode_if.c and vnode_if.h. Add vnode_if.c to
the LHS of the rule for vnode_if.h. This solves a "dunno how to make"
error.


# 51034 06-Sep-1999 n_hibma

1) s/mod(un)?load/kld$1load/

2) s/MODLOAD/KMODLOAD/ to be consistent with the rest of the variables
(KMOD, KMODOWN, KMODGRP, etc) and definition of MODLOAD/UNLOAD in the
Makefile of the ATAPI module

3) textual fixups


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 49328 31-Jul-1999 hoek

Add variable INSTALLFLAGS_EDIT used to remove arbitrary INSTALLFLAGS.

Specifically intended for removing -fschg ("INSTALLFLAGS_EDIT=:S/schg/uchg/")
this makes the NOFSCHG flag redundant. NOFSCHG will still be honoured by
bsd.lib.mk but is valid for buildworld only. NOFSCHG is still implemented in
the old way (ie. _not_ ".if NOFSCHG then { INSTALLFLAGS_EDIT+=:S/schg/,/ }"
to emphasize the fact that NOFSCHG is only supported in a limited
fashion and for buildworld.

The interface and implementation are such that future use of flags such
as sappnd can also be easily removed or altered (perhaps to uappnd).

This commit brought to you by the letters B, D, and E, and the numbers six,
one, thirteen, and three.


# 45961 23-Apr-1999 peter

s/lkm(4)/kld(4)/


# 45873 20-Apr-1999 peter

Clean out most of the LKM stuff, the build support left a little while ago.


# 44946 23-Mar-1999 bde

Removed all traces of LN_FLAGS. It was only used to produce a link
/usr/sbin/sysctl -> ${DESTDIR}/sbin/sysctl in some versions of 2.2,
and this link was broken if DESTDIR was set.

Added a SYMLINKS macro. This works the same as LINKS, except it
creates symlinks and the linked-to pathname may be relative. This
is more flexible than LN_FLAGS, since it supports installing
symlinks independently of hard links.

Use `ln -f[s] ...' instead of `rm -f ...; ln [-s] ...' for LINKS and
SYMLINKS. This is equivalent if the target is neither a directory nor
a symlink to a directory.

PR: 8279


# 41083 11-Nov-1998 peter

Use a name less likely to collide with source files without an obj dir.


# 40919 05-Nov-1998 peter

Do not add ${KMOD} to the CLEANFILES list. We want ${PROG} which is either
${KMOD}.o or ${KMOD}.ko. Otherwise we can delete the source shell script
for linux, joy and ibcs2.


# 40433 16-Oct-1998 peter

Update the kld glue

Pre-Approved by: jkh


# 40335 14-Oct-1998 peter

Support encapsulating ELF linker sets for KLD modules via gensetdefs.
Support name based dependencies at build time. This is a hack.
These only affect KLD modules.


# 39883 02-Oct-1998 msmith

Define KLD_MODULE if building a KLD module.

Forgot to mention that the previous commit was
Submitted by: Doug Rabson <dfr@freebsd.org>


# 39882 02-Oct-1998 msmith

Changes to support building of KLD modules. This includes the possibly
to be removed KMODDEPS define.


# 38749 02-Sep-1998 bde

Add -aout to CFLAGS and LDFLAGS in bsd.kmod.mk, not in
src/lkm/Makefile.inc. This fixes broken builds of the syscons LKMs
when OBJFORMAT=elf. Removed src/lkm/Makefile.inc since it became
empty and is worse than useless.


# 38183 08-Aug-1998 peter

Make ../Makefile.inc handling more consistant to prevent multiple includes
when certain .mk files include other .mk files. This will remove the
need for multiple include protection in some other makefiles around the
tree (and helps some elf conditionals).


# 37948 29-Jul-1998 bde

Honor NOSHARED for tools. All tools should be built static for
`make world' to avoid problems with picking up (new) target or (stale)
host shared libraries.

Don't honor -static in LDFLAGS for linking LKMs. LDFLAGS is not
actually for ld, but we use it anyway, and must prevent -static being
misinterpreted as -s.

Don't hide any of the link steps.


# 36780 09-Jun-1998 bde

Fixed `make depend', which I broke here about a month ago by moving
the null default for `depend' from bsd.dep.mk to bsd.obj.mk.
bsd.kmod.mk included these files in a bad order, so it picked up
the null default.


# 34677 19-Mar-1998 bde

Fixed CLEANFILES. Some temporary files were missing.


# 34528 12-Mar-1998 eivind

Introduce the 'regress' target.

Silently approved by: -hackers, -current


# 34087 06-Mar-1998 bde

Removed support for now-unused FreeBSD misfeature DPSRCS.


# 34078 06-Mar-1998 bde

Fixed dependencies of ${PROG} on ${DPSRCS} and `all' on ${_ILINKS}.
There were various races for `make -j'. Half-built versions of
vnode_if.h were sometimes #included...

Removed a null dependency.


# 33687 20-Feb-1998 bde

Removed default tags target. PROG is always defined here, so ifdefing
it was bogus, and without the ifdef the default is identical to the
central one in bsd.dep.mk.


# 32985 01-Feb-1998 bde

Restrict the include search path using -nostdinc -I- in $(CFLAGS} as
in kernel Makefiles. Nothing in /usr/include is used (provided
relative paths for sys/* and <machine> can be found), so there is
no need for the -I/usr/include kludge as in kernel Makefiles.


# 32813 26-Jan-1998 bde

Generate symlinks to the "sys" and <machine> directories and put
them in the include path. This fixes recent breakage of the syscons
LKMs and general brokenness of the include paths (headers under
/usr/include were used in many cases).


# 31074 09-Nov-1997 wosch

Remove the comments hat just list the nested includes.
The lists don't provide significantly more information than
grep '\.include', and grep gives lists that are actually correct.
Submitted by: Bruce


# 27582 21-Jul-1997 bde

Added ${KMOD} to CLEANFILES. ${KMOD} gets created if you run `make load'.


# 27120 30-Jun-1997 bde

Removed temporary SMP header fix.


# 26760 21-Jun-1997 jkh

Change the distribute targets so that a given item in our source tree
can place itself into n distributions, where n >= 1.


# 26711 18-Jun-1997 asami

Add "-I${DESTDIR}/usr/include" to CFLAGS if DESTDIR is defined, just
like bsd.lib.mk and bsd.prog.mk. It doesn't add it to CXXINCLUDES, I
don't think anybody has written a kernel module with C++. (Not that I
think DavidG will allow it anyway. :)

Reviewed by: bde


# 25508 06-May-1997 dfr

Add SMPHDRS to CLEANFILES instead of replacing its current value.


# 25324 30-Apr-1997 fsmp

removed:
opt_smp_invltlb.h
from:
SMPHDRS= opt_smp.h opt_smp_invltlb.h

SMP_INVLTLB is no longer a valid config option, the invalidation of the TLB
via inter-CPU IPIs is now standard when APIC_IO is used.


# 25323 30-Apr-1997 bde

Fixed the SMP fixes:
- fixed dependencies so that `make depend' isn't necessary.
- added new files to CLEANFILES.
- fixed style.


# 25302 30-Apr-1997 ache

bugfix: 'make depend' cause all LKMs rebuild


# 25212 27-Apr-1997 fsmp

Submitted by: Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
make world fails when it tries to build LKMs because the files
opt_smp.h
opt_smp_invltbl.h
are missing.

This patch to /usr/src/share/mk/bsd.kmod.mk is a temporary workaround.

Note that LKMs built in this way may or may NOT work properly with an
SMP kernel.


# 24861 13-Apr-1997 jkh

Support GLOBAL style tags.


# 22988 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 18820 08-Oct-1996 bde

Centralized the definition of CWARNFLAGS into bsd.kern.mk.


# 18777 06-Oct-1996 wosch

add variables MODLOAD and MODUNLOAD for modlad/modunload commands


# 18340 18-Sep-1996 swallace

.TARGETOBJDIR has been removed from make and CANONICALOBJDIR set in
bsd.obj.mk. Also, a make target called objwarn checks to see
if ${.OBJDIR} != ${.CURDIR} and ${.OBJDIR} != ${CANONICALOBJDIR}
and outputs a warning. (No warning for the latter if MAKEOBJDIR or MAKEOBJDIRP
REFIX is set). objwarn is called from all targets in bsd.prog.mk, bsd.kmod.mk,
and bsd.lib.mk.

Reviewed by: bde


# 17971 31-Aug-1996 bde

Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'. Warn about this in future.


# 16860 30-Jun-1996 jkh

Fix the ordering dependency I broke.


# 16663 24-Jun-1996 jkh

Bring in my changes for removing the pestilent obj links (unless you
really want them) from /usr/src. This is the final version of the
patches, incorporating the feedback I've received from -current.


# 16434 17-Jun-1996 bde

Synced with Makefile.i386: added -Wunused.


# 15903 25-May-1996 wosch

Add some comments for variables and targets.


# 15205 11-Apr-1996 wosch

remove variables KMODGRP?=, KMODOWN?=, KMODMODE?=
replace ${BIN*} variables with ${KMOD*} variables

cleanup manpage code

include bsd.obj.mk
remove targets clean, cleandir, obj (included by bsd.obj.mk)


# 15023 03-Apr-1996 phk

Pick up CWARNFLAGS from /etc/make.conf if defined.


# 14444 09-Mar-1996 wosch

[Ee]rrs -> Errs errs, save one process for make clean


# 12880 15-Dec-1995 bde

Added `-Wstrict-prototypes -Wmissing-prototypes' to CWARNFLAGS so that
prototypes don't go missing again. Also added -Winline so that some
doubtful (non-)inlines get fixed.

bsd.kmod.mk:
Also added `-Wreturn-type -Wimplicit -Wnested-externs' to catch up
with the kernel.


# 12080 04-Nov-1995 bde

Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the
misplaced extern declarations (mostly prototypes of interrupt handlers)
that this exposed. The prototypes should be moved back to the driver
sources when the functions are staticalized.

Added idempotency guards to <machine/conf.h>. "ioconf.h" can't be
included when building LKMs so define a wart in bsd.kmod.mk to help
guard against including it.


# 11517 15-Oct-1995 phk

An even better idea: The default will be that on _${KMOD} (_nfs_mod...) will
be exported. This breaks the compilation of some lkms, the owners of which
is kindly requested to consider what should be exported.


# 11512 15-Oct-1995 phk

Automatically DTRT for VFS_LKM


# 11503 15-Oct-1995 phk

Make a rule for cleaning the namelist of lkms.
TXT & DATA symbols not explicitly mentioned will be made local.


# 11136 02-Oct-1995 wollman

Compress manual pages (if desired) in the obj directory rather
than in the installation destination. Should make release-building
substantially faster. The msun Makefile changes simple adapt to the new
scheme.


# 7192 20-Mar-1995 wollman

Add support for pseudo-device LKMs.


# 6716 25-Feb-1995 phk

"make distribute" have changed, beware if you use it.


# 6252 08-Feb-1995 bde

More complete implementation of SUBDIR for programs, libraries and kmods.
`depend' wasn't supported. This seems to have only broken `make depend'
in gnu/usr.bin/ld.

bsd.prog.mk:
Build the man pages in ${MANDEPEND} at build time.


# 6032 30-Jan-1995 jkh

Add LN_FLAGS to all the places it makes sense.


# 5585 14-Jan-1995 jkh

Change DISTRIBUTION names. Also make bsd.doc.mk go to doc distribution,
not bin. Hmmm.


# 5339 01-Jan-1995 bde

Remove `MKDEP= -p'. Now I know why lkm compiled so fast after headers
are changed.


# 5257 28-Dec-1994 ache

Move INSTALL?=install line duplicated into each .mk to sys.mk
instead


# 4442 13-Nov-1994 phk

Add a new "distribute" target. This is a variant of install, which will
put the stuff into the right "distribution". As default things end up
in "bindist".

Normal (ie: most) makefiles know naught of this.

More commits will follow, which will direct various parts of the tree
into the distribution we want them in.

Some of the grief of being release-engineer is supposed to go away with this.


# 3135 26-Sep-1994 wollman

Lots of kernel code requires vnodE_if.h, so provide code to generate it
if requested. LKMs which need it should use:

SRCS+= vnode_if.h
CLEANFILES+= vnode_if.h vnode_if.c

These rules were already present for VFS LKMs; now they are enabled all
the time. (VFS LKMs do not need the fragment above; it is still done for them.)


# 2947 21-Sep-1994 wollman

Make it easier to create filesystem LKMs by doing most of the
work in the Makefile. Just define VFS_LKM and you're off!


# 2765 14-Sep-1994 wollman

A make system file for building LKMs, derived from bsd.prog.mk.