Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Use MACHINE_CPU instead of MACHINE_ARCH to select t...



details:   https://anonhg.NetBSD.org/src/rev/33e6f17ba8a5
branches:  trunk
changeset: 554917:33e6f17ba8a5
user:      scw <scw%NetBSD.org@localhost>
date:      Tue Nov 04 14:52:22 2003 +0000

description:
Use MACHINE_CPU instead of MACHINE_ARCH to select the appropriate
architecture directory under sys/lkm/arch. This permits a single
directory to be used for bi-endian architectures.

diffstat:

 share/mk/bsd.kmod.mk |  18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diffs (51 lines):

diff -r 522430846d4b -r 33e6f17ba8a5 share/mk/bsd.kmod.mk
--- a/share/mk/bsd.kmod.mk      Tue Nov 04 14:50:27 2003 +0000
+++ b/share/mk/bsd.kmod.mk      Tue Nov 04 14:52:22 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.kmod.mk,v 1.70 2003/10/11 07:15:59 jdolecek Exp $
+#      $NetBSD: bsd.kmod.mk,v 1.71 2003/11/04 14:52:22 scw Exp $
 
 .include <bsd.init.mk>
 
@@ -38,7 +38,8 @@
 .elif ${MACHINE} == "amd64"
 CLEANFILES+=   x86
 CFLAGS+=       -mcmodel=kernel
-.elif ${MACHINE_ARCH} == "powerpc"
+.elif ${MACHINE_CPU} == "powerpc" || \
+      ${MACHINE_CPU} == "arm"
 CLEANFILES+=   ${KMOD}_tramp.o ${KMOD}_tramp.S tmp.S ${KMOD}_tmp.o
 .endif
 
@@ -51,24 +52,25 @@
 
 ${OBJS} ${LOBJS}: ${DPSRCS}
 
-.if ${MACHINE_ARCH} == "powerpc"
+.if ${MACHINE_CPU} == "powerpc" || \
+    ${MACHINE_CPU} == "arm"
 ${KMOD}_tmp.o: ${OBJS} ${DPADD}
        ${LD} -r ${LDFLAGS} -o tmp.o ${OBJS}
        mv tmp.o ${.TARGET}
 
-${KMOD}_tramp.S: ${KMOD}_tmp.o $S/lkm/arch/${MACHINE_ARCH}/lkmtramp.awk
+${KMOD}_tramp.S: ${KMOD}_tmp.o $S/lkm/arch/${MACHINE_CPU}/lkmtramp.awk
        ${OBJDUMP} --reloc ${KMOD}_tmp.o | \
-                awk -f $S/lkm/arch/${MACHINE_ARCH}/lkmtramp.awk > tmp.S
+                awk -f $S/lkm/arch/${MACHINE_CPU}/lkmtramp.awk > tmp.S
        mv tmp.S ${.TARGET}
 
 ${PROG}: ${KMOD}_tmp.o ${KMOD}_tramp.o
        ${LD} -r ${LDFLAGS} \
                `${OBJDUMP} --reloc ${KMOD}_tmp.o | \
-                        awk -f $S/lkm/arch/${MACHINE_ARCH}/lkmwrap.awk` \
+                        awk -f $S/lkm/arch/${MACHINE_CPU}/lkmwrap.awk` \
                 -o tmp.o ${KMOD}_tmp.o ${KMOD}_tramp.o
-.if exists($S/lkm/arch/${MACHINE_ARCH}/lkmhide.awk)
+.if exists($S/lkm/arch/${MACHINE_CPU}/lkmhide.awk)
        ${OBJCOPY} \
-               `${NM} tmp.o | awk -f $S/lkm/arch/${MACHINE_ARCH}/lkmhide.awk` \
+               `${NM} tmp.o | awk -f $S/lkm/arch/${MACHINE_CPU}/lkmhide.awk` \
                tmp.o tmp1.o
        mv tmp1.o tmp.o
 .endif



Home | Main Index | Thread Index | Old Index