summaryrefslogtreecommitdiff
path: root/share/mk/bsd.lkm.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/bsd.lkm.mk')
-rw-r--r--share/mk/bsd.lkm.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/share/mk/bsd.lkm.mk b/share/mk/bsd.lkm.mk
index 58494fc4e32..f56a70f00d8 100644
--- a/share/mk/bsd.lkm.mk
+++ b/share/mk/bsd.lkm.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.lkm.mk,v 1.20 2005/09/15 07:12:18 espie Exp $
+# $OpenBSD: bsd.lkm.mk,v 1.21 2007/11/04 00:06:19 mikeb Exp $
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
@@ -20,6 +20,10 @@ CFLAGS+= ${COPTS} -D_KERNEL -D_LKM -I/sys -I/sys/arch
CFLAGS+= ${CDIAGFLAGS}
.endif
+.if ${MACHINE} == "amd64"
+CFLAGS+= -mcmodel=kernel
+.endif
+
LDFLAGS+= -r
.if defined(LKM)
SRCS?= ${LKM}.c
@@ -86,13 +90,14 @@ realinstall:
load: ${COMBINED}
if [ -x ${.CURDIR}/${POSTINSTALL} ]; then \
- modload -d -o $(LKM) -e$(LKM) -p${.CURDIR}/${POSTINSTALL} $(COMBINED); \
+ modload -d -o ${LKM} -e${LKM}_lkmentry \
+ -p${.CURDIR}/${POSTINSTALL} ${COMBINED}; \
else \
- modload -d -o $(LKM) -e$(LKM) $(COMBINED); \
+ modload -d -o ${LKM} -e${LKM}_lkmentry ${COMBINED}; \
fi
unload:
- modunload -n $(LKM)
+ modunload -n ${LKM}
install: maninstall _SUBDIRUSE