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