Module Name:    src
Committed By:   mrg
Date:           Sun Apr 17 09:47:41 UTC 2011

Modified Files:
        src/share/mk: bsd.kmodule.mk

Log Message:
prepare for evbppc modules, and allow overriding the ${MACHINE} for
installed modules.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/share/mk/bsd.kmodule.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.kmodule.mk
diff -u src/share/mk/bsd.kmodule.mk:1.27 src/share/mk/bsd.kmodule.mk:1.28
--- src/share/mk/bsd.kmodule.mk:1.27	Sun Jan  2 19:24:47 2011
+++ src/share/mk/bsd.kmodule.mk	Sun Apr 17 09:47:40 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.kmodule.mk,v 1.27 2011/01/02 19:24:47 matt Exp $
+#	$NetBSD: bsd.kmodule.mk,v 1.28 2011/04/17 09:47:40 mrg Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -36,6 +36,29 @@
 CFLAGS+=	-mlongcall
 .endif
 
+# evbppc needs some special help
+.if ${MACHINE} == "evbppc"
+
+. ifndef PPC_INTR_IMPL
+PPC_INTR_IMPL=\"powerpc/intr.h\"
+. endif
+. ifndef PPC_PCI_MACHDEP_IMPL
+PPC_PCI_MACHDEP_IMPL=\"powerpc/pci_machdep.h\"
+. endif
+CPPFLAGS+=      -DPPC_INTR_IMPL=${PPC_INTR_IMPL}
+CPPFLAGS+=      -DPPC_PCI_MACHDEP_IMPL=${DPPC_PCI_MACHDEP_IMPL}
+
+. ifdef PPC_IBM4XX
+CPPFLAGS+=      -DPPC_IBM4XX
+. elifdef PPC_BOOKE
+CPPFLAGS+=      -DPPC_BOOKE
+. else
+CPPFLAGS+=      -DPPC_OEA
+. endif
+
+.endif
+
+
 _YKMSRCS=	${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
 DPSRCS+=	${_YKMSRCS}
 CLEANFILES+=	${_YKMSRCS}
@@ -64,10 +87,11 @@
 .if !defined(KMODULEDIR)
 _OSRELEASE!=	${HOST_SH} $S/conf/osrelease.sh
 # Ensure these are recorded properly in METALOG on unprived installes:
-_INST_DIRS=	${DESTDIR}/stand/${MACHINE}
-_INST_DIRS+=	${DESTDIR}/stand/${MACHINE}/${_OSRELEASE}
-_INST_DIRS+=	${DESTDIR}/stand/${MACHINE}/${_OSRELEASE}/modules
-KMODULEDIR=	${DESTDIR}/stand/${MACHINE}/${_OSRELEASE}/modules/${KMOD}
+KMODULEARCHDIR?= ${MACHINE}
+_INST_DIRS=	${DESTDIR}/stand/${KMODULEARCHDIR}
+_INST_DIRS+=	${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE}
+_INST_DIRS+=	${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE}/modules
+KMODULEDIR=	${DESTDIR}/stand/${KMODULEARCHDIR}/${_OSRELEASE}/modules/${KMOD}
 .endif
 _PROG:=		${KMODULEDIR}/${PROG} # installed path
 

Reply via email to