diff options
author | peter <peter@FreeBSD.org> | 1998-10-16 03:32:03 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-10-16 03:32:03 +0000 |
commit | 657e5a04066aa7b7c5874399e95e36cee2dcbb60 (patch) | |
tree | 1c7f9c3e7c56664691a82f47747ec9ff2fbf03a8 /share/mk | |
parent | 58c3eb2f2c4307e5e0b06ed4a35c82494d5642fa (diff) | |
download | FreeBSD-src-657e5a04066aa7b7c5874399e95e36cee2dcbb60.zip FreeBSD-src-657e5a04066aa7b7c5874399e95e36cee2dcbb60.tar.gz |
Update the kld glue
Pre-Approved by: jkh
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.kmod.mk | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk index 0f6c31a..900300f 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.54 1998/10/02 05:08:09 msmith Exp $ +# $Id: bsd.kmod.mk,v 1.55 1998/10/14 04:04:22 peter Exp $ # # The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules. # @@ -141,6 +141,12 @@ SRCS+= vnode_if.h CLEANFILES+= vnode_if.h vnode_if.c .endif +.if defined(VFS_KLD) +CFLAGS+= -DVFS_LKM -DVFS_KLD +SRCS+= vnode_if.h +CLEANFILES+= vnode_if.h vnode_if.c +.endif + .if defined(KLDMOD) && ${OBJFORMAT} == elf CLEANFILES+= setdef0.c setdef1.c setdefs.h CLEANFILES+= setdef0.o setdef1.o @@ -209,6 +215,7 @@ all: objwarn ${PROG} all-man _SUBDIR beforedepend ${OBJS}: ${_ILINKS} +.if !defined(KLDMOD) # The search for the link targets works best if we are in a normal src # tree, and not too deeply below src/lkm. If we are near "/", then # we may find /sys - this is harmless. Other abnormal "sys" directories @@ -230,6 +237,26 @@ ${_ILINKS}: path=`(cd $$path && /bin/pwd)` ; \ ${ECHO} ${.TARGET} "->" $$path ; \ ln -s $$path ${.TARGET} +.else +${_ILINKS}: + @set +x; for up in ../.. ../../.. ; do \ + case ${.TARGET} in \ + machine) \ + testpath=${.CURDIR}/$$up/${MACHINE_ARCH}/include ; \ + path=${.CURDIR}/$$up/${MACHINE_ARCH}/include ; \ + defaultpath=/usr/include/machine ;; \ + @) \ + testpath=${.CURDIR}/$$up/sys ; \ + path=${.CURDIR}/$$up ; \ + defaultpath=/usr/include ;; \ + esac ; \ + if [ -d $$testpath ] ; then break ; fi ; \ + path=$$defaultpath ; \ + done ; \ + path=`(cd $$path && /bin/pwd)` ; \ + ${ECHO} ${.TARGET} "->" $$path ; \ + ln -s $$path ${.TARGET} +.endif CLEANFILES+= ${KMOD} ${PROG} ${OBJS} ${_ILINKS} lkm_verify_tmp symb.tmp tmp.o @@ -284,7 +311,11 @@ unload: ${PROG} ${MODUNLOAD} -n ${KMOD} .endif +.if exists(${.CURDIR}/../../kern) +KERN= ${.CURDIR}/../../kern +.else KERN= ${.CURDIR}/../../sys/kern +.endif vnode_if.h: ${KERN}/vnode_if.sh ${KERN}/vnode_if.src sh ${KERN}/vnode_if.sh ${KERN}/vnode_if.src |