Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/crash - make this work for arm32



details:   https://anonhg.NetBSD.org/src/rev/20427ce603c6
branches:  trunk
changeset: 777355:20427ce603c6
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Feb 16 02:37:43 2012 +0000

description:
- make this work for arm32
- factor out duplicated ifdefs

diffstat:

 usr.sbin/crash/Makefile |  31 ++++++++++++++-----------------
 1 files changed, 14 insertions(+), 17 deletions(-)

diffs (61 lines):

diff -r 26fcca05b2e4 -r 20427ce603c6 usr.sbin/crash/Makefile
--- a/usr.sbin/crash/Makefile   Thu Feb 16 02:35:52 2012 +0000
+++ b/usr.sbin/crash/Makefile   Thu Feb 16 02:37:43 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.16 2012/01/31 21:17:57 mlelstv Exp $
+#      $NetBSD: Makefile,v 1.17 2012/02/16 02:37:43 christos Exp $
 
 PROG=          crash
 MAN=           crash.8
@@ -15,7 +15,10 @@
     || ${MACHINE} == "hp700" \
     || ${MACHINE} == "i386" \
     || ${MACHINE} == "sparc64" \
+    || (${MACHINE_ARCH} == "arm" && ${MACHINE} != "acorn26") \
     || ${MACHINE_ARCH} == "m68k"
+SRCS+= db_trace.c
+SRCS+= db_machdep.c
 REALCRASH=yes
 .else
 REALCRASH=no
@@ -40,30 +43,24 @@
 .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
 SRCS+= db_disasm.c
 
+CPPFLAGS+=     -I${S}/arch
+
 . if    ${MACHINE} == "amd64" \
      || ${MACHINE} == "i386"
 MACHINE_FAMILY = x86
-.PATH: ${S}/arch/x86/x86
-SRCS+= db_trace.c
-SRCS+= db_machdep.c
+. elif  ${MACHINE_ARCH} == "m68k" \
+     || ${MACHINE_ARCH} == "arm"
+MACHINE_FAMILY = ${MACHINE_ARCH}
 . else
 MACHINE_FAMILY = ${MACHINE}
 . endif
 
-. if ${MACHINE} == "hp700"
-SRCS+= db_trace.c db_machdep.c
-. endif
+.if ${MACHINE_ARCH} == "arm"
+.PATH: ${S}/arch/arm/arm32
+SRCS+=disassem.c setstack.S cpufunc_asm.S
+.endif
 
-. if ${MACHINE} == "sparc64"
-SRCS+= db_trace.c db_interface.c
-. endif
-
-. if   ${MACHINE_ARCH} == "m68k"
-MACHINE_FAMILY = m68k
-.PATH: ${S}/arch/m68k/m68k
-CPPFLAGS+=     -I${S}/arch
-SRCS+= db_trace.c db_interface.c
-. endif
+.PATH: ${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY}
 
 # crash main source
 SRCS+= crash.c



Home | Main Index | Thread Index | Old Index