Add PKG_OPTIONS handle kernel compatibility issues for

options DEBUG
options DIAGNOSTIC
options LOCKDEBUG
options MALLOCLOG
options MULTIPROCESSOR

all of which must be defined for LKM's if the kernel has them.
This commit is contained in:
Iain Hibbert 2006-02-19 14:06:40 +00:00 committed by Thomas Klausner
parent d5f6a61296
commit 93065c48c2

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2006/02/13 20:38:13 plunky Exp $
# $NetBSD: Makefile,v 1.3 2006/02/19 14:06:40 plunky Exp $
DISTNAME= lzs-lkm-1.2
CATEGORIES= net
@ -20,6 +20,33 @@ INSTALLATION_DIRS= lkm
WRKSRC= ${WRKDIR:Q}/ppp-lzs-1.2
.include "../../mk/bsd.prefs.mk"
PKG_OPTIONS_VAR= PKG_OPTIONS.lkm
PKG_SUPPORTED_OPTIONS= lkm-diagnostic lkm-debug lkm-lockdebug lkm-malloclog lkm-multiprocessor
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mlkm-diagnostic)
CPPFLAGS+= -DDIAGNOSTIC
.endif
.if !empty(PKG_OPTIONS:Mlkm-debug)
CPPFLAGS+= -DDEBUG
.endif
.if !empty(PKG_OPTIONS:Mlkm-lockdebug)
CPPFLAGS+= -DLOCKDEBUG
.endif
.if !empty(PKG_OPTIONS:Mlkm-malloclog)
CPPFLAGS+= -DMALLOCLOG
.endif
.if !empty(PKG_OPTIONS:Mlkm-multiprocessor)
CPPFLAGS+= -DMULTIPROCESSOR
.endif
do-install:
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
${WRKSRC:Q}/lkm/lzs.o ${PREFIX:Q}/lkm/lzs.o