Home | History | Annotate | Line # | Download | only in crash
Makefile revision 1.22.2.2
      1  1.22.2.2       tls #	$NetBSD: Makefile,v 1.22.2.2 2013/06/23 06:29:03 tls 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.22.2.2       tls . elif    ${MACHINE} == "sparc64" \
     57  1.22.2.2       tls      || ${MACHINE} == "sparc64"
     58  1.22.2.2       tls MACHINE_FAMILY = sparc
     59      1.11  christos . else
     60      1.11  christos MACHINE_FAMILY = ${MACHINE}
     61      1.10       mrg . endif
     62      1.10       mrg 
     63      1.17  christos .if ${MACHINE_ARCH} == "arm"
     64      1.17  christos .PATH:	${S}/arch/arm/arm32
     65      1.22     skrll SRCS+=disassem.c cpufunc_asm.S
     66      1.17  christos .endif
     67       1.1        ad 
     68      1.17  christos .PATH:	${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY}
     69      1.16   mlelstv 
     70       1.1        ad # crash main source
     71       1.1        ad SRCS+=	crash.c
     72       1.1        ad 
     73       1.1        ad # arch.c
     74       1.1        ad .PATH:	${.CURDIR}/arch
     75      1.11  christos . if (exists(${.CURDIR}/arch/${MACHINE_FAMILY}.c))
     76      1.11  christos SRCS+=	${MACHINE_FAMILY}.c
     77       1.7  christos . else
     78       1.1        ad SRCS+=	generic.c
     79       1.7  christos . endif
     80       1.1        ad 
     81      1.13  christos COPTS.db_output.c += -Wno-format-nonliteral
     82      1.13  christos 
     83       1.1        ad # vers.c
     84       1.1        ad SRCS+=	vers.c
     85  1.22.2.1       tls vers.c:	${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS}
     86      1.18  christos 	${HOST_SH} ${S}/conf/newvers.sh -r -n
     87       1.1        ad CLEANFILES+=	vers.c version
     88       1.1        ad 
     89      1.10       mrg .else				# } {
     90      1.10       mrg 
     91      1.10       mrg SRCS+=	unsupported.c
     92      1.10       mrg 
     93      1.10       mrg .endif				# }
     94       1.1        ad 
     95       1.1        ad .include <bsd.prog.mk>
     96       1.1        ad .include <bsd.klinks.mk>
     97