Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libkern Use MACHINE_CPU to find the architecture sub...



details:   https://anonhg.NetBSD.org/src/rev/3722362655aa
branches:  trunk
changeset: 503861:3722362655aa
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Fri Feb 16 16:58:27 2001 +0000

description:
Use MACHINE_CPU to find the architecture subdir, or MACHINE_ARCH if that
exists.  Same algorithm as libc uses.

diffstat:

 sys/lib/libkern/Makefile |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 4dc1870588a9 -r 3722362655aa sys/lib/libkern/Makefile
--- a/sys/lib/libkern/Makefile  Fri Feb 16 16:00:29 2001 +0000
+++ b/sys/lib/libkern/Makefile  Fri Feb 16 16:58:27 2001 +0000
@@ -1,9 +1,20 @@
-#      $NetBSD: Makefile,v 1.58 2001/02/15 23:17:44 simonb Exp $
+#      $NetBSD: Makefile,v 1.59 2001/02/16 16:58:27 bjh21 Exp $
 
 LIB=   kern
 MKPIC= no
 
-ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/arm(26|32)/arm/:C/sh3e[bl]/sh3/}
+.include <bsd.own.mk>
+
+.if exists(${KERNDIR}/arch/${MACHINE_ARCH})
+ARCHSUBDIR=     ${MACHINE_ARCH}
+.elif exists(${KERNDIR}/arch/${MACHINE_CPU}) 
+ARCHSUBDIR=     ${MACHINE_CPU}
+.else
+.BEGIN:
+        @echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
+        @false
+.endif
+
 M= ${KERNDIR}/arch/${ARCHSUBDIR}
 
 CPPFLAGS=      -I$M ${KERNCPPFLAGS} ${KERNMISCCPPFLAGS}



Home | Main Index | Thread Index | Old Index