- 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
1 changed files with 14 additions and 17 deletions

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
MAN= crash.8
@ -15,7 +15,10 @@ DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO}
|| ${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 @@ SRCS+= db_sym.c db_variables.c db_write_cmd.c
.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