Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk prepare for evbppc modules, and allow overriding th...
details: https://anonhg.NetBSD.org/src/rev/5043f3de0769
branches: trunk
changeset: 764343:5043f3de0769
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Apr 17 09:47:40 2011 +0000
description:
prepare for evbppc modules, and allow overriding the ${MACHINE} for
installed modules.
diffstat:
share/mk/bsd.kmodule.mk | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diffs (55 lines):
diff -r 228746ec9620 -r 5043f3de0769 share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk Sun Apr 17 09:01:57 2011 +0000
+++ b/share/mk/bsd.kmodule.mk Sun Apr 17 09:47:40 2011 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index