Home | History | Annotate | Line # | Download | only in crash
Makefile revision 1.11
      1 #	$NetBSD: Makefile,v 1.11 2011/04/30 16:57:58 christos Exp $
      2 
      3 PROG=		crash
      4 MAN=		crash.8
      5 RUMPKERNEL=	yes	# XXX: Avoid -mcmodel=kernel
      6 
      7 LDADD+=	-lutil -lkvm -ledit -lterminfo -T${.CURDIR}/ldscript.crash
      8 DPADD+=	${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO}
      9 
     10 # some ddb kernel components need limited modifications.  for now,
     11 # punt if not noted as implemented here.
     12 .if    ${MACHINE} == "amd64" \
     13     || ${MACHINE} == "i386" \
     14     || ${MACHINE} == "sparc64"
     15 REALCRASH=yes
     16 .else
     17 REALCRASH=no
     18 .endif
     19 
     20 .if ${REALCRASH} != "no"	# {
     21 
     22 S=		${.CURDIR}/../../sys
     23 
     24 CPPFLAGS+=	-I${.CURDIR} -I${.OBJDIR} -I${S} -fno-strict-aliasing
     25 CPPFLAGS+=	-DDDB_VERBOSE_HELP -DDB_MAX_LINE=10000000 -D_KMEMUSER
     26 CPPFLAGS+=	-UDB_MACHINE_COMMANDS
     27 
     28 # ddb files from kernel
     29 .PATH:	$S/ddb
     30 SRCS+=	db_command.c db_lwp.c db_proc.c db_xxx.c db_cpu.c
     31 SRCS+=	db_access.c db_elf.c db_examine.c
     32 SRCS+=	db_expr.c db_lex.c db_output.c db_print.c
     33 SRCS+=	db_sym.c db_variables.c db_write_cmd.c
     34 
     35 .PATH:	${S}/arch/${MACHINE}/${MACHINE}
     36 SRCS+=	db_disasm.c
     37 
     38 . if    ${MACHINE} == "amd64" \
     39      || ${MACHINE} == "i386"
     40 MACHINE_FAMILY = x86
     41 .PATH:	${S}/arch/x86/x86
     42 SRCS+=	db_trace.c
     43 SRCS+=	db_machdep.c
     44 . else
     45 MACHINE_FAMILY = ${MACHINE}
     46 . endif
     47 
     48 . if ${MACHINE} == "sparc64"
     49 SRCS+=	db_trace.c db_interface.c
     50 . endif
     51 
     52 # crash main source
     53 SRCS+=	crash.c
     54 
     55 # arch.c
     56 .PATH:	${.CURDIR}/arch
     57 . if (exists(${.CURDIR}/arch/${MACHINE_FAMILY}.c))
     58 SRCS+=	${MACHINE_FAMILY}.c
     59 . else
     60 SRCS+=	generic.c
     61 . endif
     62 
     63 # vers.c
     64 SRCS+=	vers.c
     65 vers.c:	${S}/conf/newvers.sh
     66 	${HOST_SH} ${S}/conf/newvers.sh -r
     67 CLEANFILES+=	vers.c version
     68 
     69 .else				# } {
     70 
     71 SRCS+=	unsupported.c
     72 
     73 .endif				# }
     74 
     75 .include <bsd.prog.mk>
     76 .include <bsd.klinks.mk>
     77