1 1.23 apb # $NetBSD: Makefile,v 1.23 2012/11/04 11:12:32 apb Exp $ 2 1.1 ad 3 1.7 christos PROG= crash 4 1.7 christos MAN= crash.8 5 1.3 christos RUMPKERNEL= yes # XXX: Avoid -mcmodel=kernel 6 1.1 ad 7 1.12 joerg CWARNFLAGS.clang+= -Wno-format 8 1.12 joerg 9 1.14 skrll LDADD+= -lutil -lkvm -ledit -lterminfo 10 1.7 christos DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO} 11 1.1 ad 12 1.1 ad # some ddb kernel components need limited modifications. for now, 13 1.1 ad # punt if not noted as implemented here. 14 1.10 mrg .if ${MACHINE} == "amd64" \ 15 1.15 skrll || ${MACHINE} == "hp700" \ 16 1.10 mrg || ${MACHINE} == "i386" \ 17 1.16 mlelstv || ${MACHINE} == "sparc64" \ 18 1.17 christos || (${MACHINE_ARCH} == "arm" && ${MACHINE} != "acorn26") \ 19 1.16 mlelstv || ${MACHINE_ARCH} == "m68k" 20 1.17 christos SRCS+= db_trace.c 21 1.21 christos .if ${MACHINE_ARCH} != "m68k" 22 1.17 christos SRCS+= db_machdep.c 23 1.21 christos .endif 24 1.10 mrg REALCRASH=yes 25 1.1 ad .else 26 1.10 mrg REALCRASH=no 27 1.10 mrg .endif 28 1.10 mrg 29 1.10 mrg .if ${REALCRASH} != "no" # { 30 1.1 ad 31 1.7 christos S= ${.CURDIR}/../../sys 32 1.1 ad 33 1.1 ad CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR} -I${S} -fno-strict-aliasing 34 1.1 ad CPPFLAGS+= -DDDB_VERBOSE_HELP -DDB_MAX_LINE=10000000 -D_KMEMUSER 35 1.8 mrg CPPFLAGS+= -UDB_MACHINE_COMMANDS 36 1.1 ad 37 1.1 ad # ddb files from kernel 38 1.1 ad .PATH: $S/ddb 39 1.1 ad SRCS+= db_command.c db_lwp.c db_proc.c db_xxx.c db_cpu.c 40 1.1 ad SRCS+= db_access.c db_elf.c db_examine.c 41 1.1 ad SRCS+= db_expr.c db_lex.c db_output.c db_print.c 42 1.1 ad SRCS+= db_sym.c db_variables.c db_write_cmd.c 43 1.1 ad 44 1.7 christos .PATH: ${S}/arch/${MACHINE}/${MACHINE} 45 1.15 skrll .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} 46 1.10 mrg SRCS+= db_disasm.c 47 1.7 christos 48 1.17 christos CPPFLAGS+= -I${S}/arch 49 1.17 christos 50 1.10 mrg . if ${MACHINE} == "amd64" \ 51 1.10 mrg || ${MACHINE} == "i386" 52 1.11 christos MACHINE_FAMILY = x86 53 1.17 christos . elif ${MACHINE_ARCH} == "m68k" \ 54 1.17 christos || ${MACHINE_ARCH} == "arm" 55 1.17 christos MACHINE_FAMILY = ${MACHINE_ARCH} 56 1.11 christos . else 57 1.11 christos MACHINE_FAMILY = ${MACHINE} 58 1.10 mrg . endif 59 1.10 mrg 60 1.17 christos .if ${MACHINE_ARCH} == "arm" 61 1.17 christos .PATH: ${S}/arch/arm/arm32 62 1.22 skrll SRCS+=disassem.c cpufunc_asm.S 63 1.17 christos .endif 64 1.1 ad 65 1.17 christos .PATH: ${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY} 66 1.16 mlelstv 67 1.1 ad # crash main source 68 1.1 ad SRCS+= crash.c 69 1.1 ad 70 1.1 ad # arch.c 71 1.1 ad .PATH: ${.CURDIR}/arch 72 1.11 christos . if (exists(${.CURDIR}/arch/${MACHINE_FAMILY}.c)) 73 1.11 christos SRCS+= ${MACHINE_FAMILY}.c 74 1.7 christos . else 75 1.1 ad SRCS+= generic.c 76 1.7 christos . endif 77 1.1 ad 78 1.13 christos COPTS.db_output.c += -Wno-format-nonliteral 79 1.13 christos 80 1.1 ad # vers.c 81 1.1 ad SRCS+= vers.c 82 1.23 apb vers.c: ${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS} 83 1.18 christos ${HOST_SH} ${S}/conf/newvers.sh -r -n 84 1.1 ad CLEANFILES+= vers.c version 85 1.1 ad 86 1.10 mrg .else # } { 87 1.10 mrg 88 1.10 mrg SRCS+= unsupported.c 89 1.10 mrg 90 1.10 mrg .endif # } 91 1.1 ad 92 1.1 ad .include <bsd.prog.mk> 93 1.1 ad .include <bsd.klinks.mk> 94