Commit Graph

204 Commits

Author SHA1 Message Date
Tom Rhodes
5a19f6d9d4 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
2004-03-14 01:29:05 +00:00
Tom Rhodes
06d6e4fcfe 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
2004-03-12 21:36:12 +00:00
Ruslan Ermilov
776f50b966 Overdue reversion of revision 1.143.
OK'ed by:	imp
2004-03-06 21:23:56 +00:00
Ruslan Ermilov
817b59bff6 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.
2004-02-13 10:40:54 +00:00
Ruslan Ermilov
4c293d355f We didn't strip debugging symbols from .ko if DEBUG was undefined. 2004-02-13 09:39:45 +00:00
Ruslan Ermilov
e0dd77fdd7 Don't add CWARNFLAGS to CFLAGS here, they were already added by bsd.sys.mk. 2003-12-25 14:07:52 +00:00
Warner Losh
3193579b66 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)
2003-11-19 05:08:27 +00:00
Warner Losh
62d768efe6 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.
2003-11-17 05:21:18 +00:00
Brian Feldman
75504450a1 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.
2003-11-16 08:10:59 +00:00
Brian Feldman
5e36d52bef 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.
2003-11-16 07:50:14 +00:00
Warner Losh
6b1bb55958 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.
2003-11-16 01:41:38 +00:00
Brian Feldman
8fa793d0fe 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.
2003-11-14 16:04:11 +00:00
Peter Wemm
5064105e52 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.
2003-11-04 23:29:17 +00:00
Warner Losh
eefb5d68b2 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
2003-10-03 22:00:06 +00:00
Ruslan Ermilov
bf17fc53ac Revert rev. 1.86, I've fixed make(1) (make/dir.c,v 1.32).
PR:		bin/34062
2003-10-02 21:34:06 +00:00
Marcel Moolenaar
2bec1c8919 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.
2003-09-06 23:23:26 +00:00
Warner Losh
74455e5526 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.
2003-08-22 15:41:44 +00:00
Peter Wemm
a92a214401 Change the inline limit switch to something that exists in gcc-3.2.
Unfortunately, it has different units.
2003-07-26 02:27:50 +00:00
Peter Wemm
2a51529f7e 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).
2003-07-23 20:03:42 +00:00
Ruslan Ermilov
f2bffe0f7f exists() is too aggressive when searching for files without a full path.
Inspired by:	bsd.prog.mk,v 1.105
2003-03-03 22:51:22 +00:00
Ruslan Ermilov
ddc474a84b 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
2003-02-28 22:12:17 +00:00
Yoshihiro Takahashi
83536948ae Add CanBe power management controller support.
Submitted by:	KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2003-02-03 14:46:26 +00:00
Jake Burkholder
4875819c6e Run kldxref on sparc64, it works now. 2003-01-21 05:52:48 +00:00
David E. O'Brien
2d3ce7133a Remove miidevs.h and generate it from miidevs at compile time.
The devlist2h.awk tool to do this has been repocopied to sys/tools/.
2003-01-19 02:59:34 +00:00
Jake Burkholder
f2de139378 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
2002-12-13 00:32:29 +00:00
Maxime Henrion
361186e5d5 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
2002-11-06 17:40:13 +00:00
Sam Leffler
c4f9e3ae7f add crypto interface to the MFILES list 2002-10-04 20:36:39 +00:00
Peter Wemm
66422f5b7a 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
2002-09-17 01:49:00 +00:00
Ruslan Ermilov
d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Ruslan Ermilov
2b06260dfa Handle installation of links through bsd.links.mk.
Removed comments that no longer directly apply here.
2002-07-17 08:21:50 +00:00
Ruslan Ermilov
6dc6a04be5 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.
2002-07-11 14:13:37 +00:00
Nick Hibma
dba3dc7bdc 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.
2002-06-17 20:01:06 +00:00
Ruslan Ermilov
be1d673d24 Check that kldxref(8) exists before running it. 2002-05-14 07:49:12 +00:00
Warner Losh
3498b5ed09 We don't need no stinkin' echos here.
Instead, don't run kldxref if you don't have one on your system.
2002-05-01 19:24:26 +00:00
David E. O'Brien
9fa411ae4a Use makeobjops.awk rather than makeobjops.pl.
(with big thanks to Oliver Fromme <olli@fromme.com>)
2002-05-01 03:28:14 +00:00
Peter Wemm
06639be707 Catch any stray KMODDEPS entries to make sure they do not keep turning up. 2002-05-01 01:32:28 +00:00
David E. O'Brien
f3320cac13 Barrow something from the `nmap' port to help the ENOCLUE people upgrading
from releng4 and are not able to properly read make(1) output.
2002-04-29 06:35:25 +00:00
Ruslan Ermilov
2cbc81ffe4 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
2002-04-24 11:26:19 +00:00
Ruslan Ermilov
b25a566d47 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.)
2002-04-23 09:03:56 +00:00
Ruslan Ermilov
05276e5f8c Back out remnants of revision 1.97: we don't need TARGET_ARCH here. 2002-04-22 15:53:04 +00:00
Ruslan Ermilov
0ac2fc87d2 Use standard bsd.init.mk prologue. 2002-04-22 15:47:11 +00:00
Ruslan Ermilov
bbb467cd9a lint the previous lint commit.
Reviewed by:	markm
2002-03-18 09:35:45 +00:00
Mark Murray
766f7d6e03 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.
2002-03-17 10:05:57 +00:00
David E. O'Brien
b7bbb709c2 Use vnode_if.awk rather than vnode_if.pl 2002-03-01 01:21:29 +00:00
Ruslan Ermilov
17d6c63672 Drop <bsd.man.mk> support from <bsd.kmod.mk>.
Not objected to by:	-current
2002-01-11 15:49:02 +00:00
Mike Smith
93f0354850 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.
2002-01-11 01:11:44 +00:00
Mike Smith
0b3178a45c 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)
2002-01-10 03:52:01 +00:00
Dag-Erling Smørgrav
a4c0058691 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
2001-10-27 00:52:50 +00:00
Peter Wemm
ad7da9b460 On second thoughts, make kldxref failures non-fatal. 2001-09-11 01:13:49 +00:00
Peter Wemm
505222d35f 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
2001-09-11 01:09:24 +00:00
Brian Feldman
46877fb22c 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
2001-08-08 13:51:10 +00:00
Sheldon Hearn
f66116083c 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.
2001-08-02 09:22:18 +00:00
Peter Pentchev
2f7538d646 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
2001-07-18 09:59:55 +00:00
Peter Wemm
f41325db5f 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
2001-06-13 10:58:39 +00:00
David E. O'Brien
ea87b3cb61 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@
2001-04-25 20:56:15 +00:00
Boris Popov
6f2d8adb12 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
2001-04-09 09:39:29 +00:00
Ruslan Ermilov
7da4bd3beb 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.
2001-03-27 11:50:44 +00:00
David E. O'Brien
cce2a16325 Cleaner way of adding -fschg (ie, correctly implement).
"INSTALLFLAGS" belongs to individual Makefiles.
"_INSTALLFLAGS" is for global additions.

Submitted by:	bde
2001-03-24 08:31:45 +00:00
Warner Losh
985f41af12 Move beforedepend: outside of the loop.
# Note: we should remove the rm kludge soon.  It fails in many cases.

Submitted by: bde
2001-03-05 06:19:29 +00:00
David E. O'Brien
0d2e2e23c1 Set TARGET_ARCH and install files -fschg as we do the kernel module. 2001-03-04 05:29:10 +00:00
Peter Wemm
ed277dc979 Add pci/agp_if.m to the MFILES list so that we can auto depend on agp_if.h 2001-02-27 01:23:34 +00:00
Warner Losh
f3cc9575fd 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
2001-02-23 04:49:31 +00:00
Peter Wemm
2fbfac2739 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
2001-02-20 09:37:00 +00:00
Peter Wemm
9ccedbb11b Back out rev 1.92 2001-02-19 18:27:42 +00:00
Peter Wemm
146a90334d "Fix" the machine/lock.h problem in modules depend with a sledge hammer.
This forces bsd.dep.mk to rebuild the .depend file.
2001-02-18 20:23:22 +00:00
Marcel Moolenaar
8e739d9fa0 Revert gensetdefs.pl reversal. 2001-02-17 07:26:57 +00:00
Marcel Moolenaar
8e8cae2b0c Revert previous commit. I messed up my testing. 2001-01-28 21:24:05 +00:00
Marcel Moolenaar
136345c019 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
2001-01-28 06:39:56 +00:00
Cameron Grant
0f55ac6c1a 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.
2000-12-18 01:36:41 +00:00
Mike Smith
7e820aaa1e 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.
2000-12-08 22:26:48 +00:00
Jason Evans
aabafca098 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.
2000-12-08 20:36:32 +00:00
Takanori Watanabe
0df282c2e4 Add pcib_if location to list of *.m files. 2000-10-31 02:25:20 +00:00
Poul-Henning Kamp
26dac111f1 Add a hook for doing #include magic (for src/tools/tools/kerninclude). 2000-10-29 09:47:50 +00:00
David E. O'Brien
3bdfa9e589 The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.
2000-09-05 22:37:46 +00:00
Coleman Kane
48bd8a660c Fix the 'file not found' in the load target, someone
forgot to add the '.ko' to the end of the module filename.
2000-06-22 02:07:18 +00:00
Peter Wemm
09be11ba99 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.
2000-05-01 18:06:49 +00:00
Warner Losh
9a8631b340 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
2000-04-08 17:20:00 +00:00
Doug Rabson
c0de587901 Use makeobjops.pl instead of makedevops.pl. 2000-04-08 15:31:28 +00:00
Doug Rabson
7fecffec3d Allow the calling Makefile to specify a list of device interfaces instead
of relying on the default list provided here.
2000-04-05 10:13:05 +00:00
Peter Wemm
9e0f2a9fb1 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.
2000-03-20 01:29:59 +00:00
Bruce Evans
9e4be63dd6 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.
2000-01-28 11:26:46 +00:00
Peter Wemm
647b247c34 oops, nearly forgot to commit the addition of ppbus_if.m to the list. 2000-01-23 15:42:44 +00:00
Bruce Evans
a0b845fe92 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.
2000-01-08 18:48:57 +00:00
Peter Wemm
c447342094 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.
1999-12-29 05:07:58 +00:00
Peter Wemm
3b073b53b7 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.
1999-12-22 01:07:30 +00:00
Peter Wemm
9029b6442a 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.
1999-12-12 16:45:58 +00:00
Warner Losh
052331f45b 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.
1999-11-28 20:18:50 +00:00
Bruce Evans
4fea670478 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.
1999-11-28 17:52:40 +00:00
Marcel Moolenaar
84eadd6305 Add .ORDER which is needed for the previous commit to work with -jN.
Pointed out by: bde
1999-11-23 17:18:52 +00:00
Marcel Moolenaar
5f644e4c72 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.
1999-11-23 10:17:36 +00:00
Nick Hibma
fe3cac87c1 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
1999-09-06 20:11:59 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Tim Vanderhoek
e902c1bb07 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.
1999-07-31 20:27:33 +00:00
Peter Wemm
e0e77ef1c6 s/lkm(4)/kld(4)/ 1999-04-23 20:53:34 +00:00
Peter Wemm
713959259e Clean out most of the LKM stuff, the build support left a little while ago. 1999-04-20 14:33:24 +00:00
Bruce Evans
2336a7ea75 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
1999-03-23 03:06:25 +00:00
Peter Wemm
1e216ab590 Use a name less likely to collide with source files without an obj dir. 1998-11-11 07:40:44 +00:00
Peter Wemm
92892ca7a5 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.
1998-11-05 04:01:55 +00:00
Peter Wemm
08a04a8985 Update the kld glue
Pre-Approved by: jkh
1998-10-16 03:32:03 +00:00
Peter Wemm
fdbdd3a05f 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.
1998-10-14 04:04:22 +00:00