diff options
author | msmith <msmith@FreeBSD.org> | 1998-10-02 04:51:10 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1998-10-02 04:51:10 +0000 |
commit | 51d91e56f120b609831461babea902d61e019803 (patch) | |
tree | 6f7c68bc6764954eae4060c9b63c832fe433a940 /share/mk | |
parent | 5f8a3330cad165c366602fa8eccdedba3b06b5b3 (diff) | |
download | FreeBSD-src-51d91e56f120b609831461babea902d61e019803.zip FreeBSD-src-51d91e56f120b609831461babea902d61e019803.tar.gz |
Changes to support building of KLD modules. This includes the possibly
to be removed KMODDEPS define.
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.kmod.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk index febbec5..fa3ba95 100644 --- a/share/mk/bsd.kmod.mk +++ b/share/mk/bsd.kmod.mk @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.kmod.mk,v 1.51 1998/08/08 07:02:07 peter Exp $ +# $Id: bsd.kmod.mk,v 1.52 1998/09/02 14:29:09 bde Exp $ # # The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules. # @@ -47,6 +47,8 @@ # # SRCS List of source files # +# KMODDEPS List of modules which this one is dependant on +# # SUBDIR A list of subdirectories that should be built as well. # Each of the targets will execute the same target in the # subdirectories. @@ -132,10 +134,17 @@ CFLAGS+= -DPSEUDO_LKM OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .if !defined(PROG) +.if defined(KLDMOD) +PROG= ${KMOD}.ko +.else PROG= ${KMOD}.o .endif +.endif ${PROG}: ${OBJS} ${DPADD} +.if defined(KLDMOD) + ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${OBJS} ${KMODDEPS} +.else ${LD} -r ${LDFLAGS:N-static} -o tmp.o ${OBJS} .if defined(EXPORT_SYMS) rm -f symb.tmp @@ -144,6 +153,7 @@ ${PROG}: ${OBJS} ${DPADD} rm -f symb.tmp .endif mv tmp.o ${.TARGET} +.endif .if !defined(NOMAN) .include <bsd.man.mk> |