- make this work for arm32

- factor out duplicated ifdefs
This commit is contained in:
christos 2012-02-16 02:37:43 +00:00
parent 2d3665a7b6
commit dd63132492

View File

@ -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 PROG= crash
MAN= crash.8 MAN= crash.8
@ -15,7 +15,10 @@ DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO}
|| ${MACHINE} == "hp700" \ || ${MACHINE} == "hp700" \
|| ${MACHINE} == "i386" \ || ${MACHINE} == "i386" \
|| ${MACHINE} == "sparc64" \ || ${MACHINE} == "sparc64" \
|| (${MACHINE_ARCH} == "arm" && ${MACHINE} != "acorn26") \
|| ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m68k"
SRCS+= db_trace.c
SRCS+= db_machdep.c
REALCRASH=yes REALCRASH=yes
.else .else
REALCRASH=no REALCRASH=no
@ -40,30 +43,24 @@ SRCS+= db_sym.c db_variables.c db_write_cmd.c
.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
SRCS+= db_disasm.c SRCS+= db_disasm.c
CPPFLAGS+= -I${S}/arch
. if ${MACHINE} == "amd64" \ . if ${MACHINE} == "amd64" \
|| ${MACHINE} == "i386" || ${MACHINE} == "i386"
MACHINE_FAMILY = x86 MACHINE_FAMILY = x86
.PATH: ${S}/arch/x86/x86 . elif ${MACHINE_ARCH} == "m68k" \
SRCS+= db_trace.c || ${MACHINE_ARCH} == "arm"
SRCS+= db_machdep.c MACHINE_FAMILY = ${MACHINE_ARCH}
. else . else
MACHINE_FAMILY = ${MACHINE} MACHINE_FAMILY = ${MACHINE}
. endif . endif
. if ${MACHINE} == "hp700" .if ${MACHINE_ARCH} == "arm"
SRCS+= db_trace.c db_machdep.c .PATH: ${S}/arch/arm/arm32
. endif SRCS+=disassem.c setstack.S cpufunc_asm.S
.endif
. if ${MACHINE} == "sparc64" .PATH: ${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY}
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
# crash main source # crash main source
SRCS+= crash.c SRCS+= crash.c