Home | History | Annotate | Line # | Download | only in crash
Makefile revision 1.22.2.3
      1  1.22.2.2       tls #	$NetBSD: Makefile,v 1.22.2.3 2014/08/20 00:05:07 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.22.2.3       tls .include <bsd.own.mk>
     13  1.22.2.3       tls 
     14       1.1        ad # some ddb kernel components need limited modifications.  for now,
     15       1.1        ad # punt if not noted as implemented here.
     16      1.10       mrg .if    ${MACHINE} == "amd64" \
     17  1.22.2.3       tls     || ${MACHINE} == "hppa" \
     18      1.10       mrg     || ${MACHINE} == "i386" \
     19      1.16   mlelstv     || ${MACHINE} == "sparc64" \
     20  1.22.2.3       tls     || (${MACHINE_CPU} == "arm" && ${MACHINE} != "acorn26") \
     21      1.16   mlelstv     || ${MACHINE_ARCH} == "m68k"
     22      1.17  christos SRCS+=	db_trace.c
     23      1.21  christos .if ${MACHINE_ARCH} != "m68k"
     24      1.17  christos SRCS+=	db_machdep.c
     25      1.21  christos .endif
     26      1.10       mrg REALCRASH=yes
     27       1.1        ad .else
     28      1.10       mrg REALCRASH=no
     29      1.10       mrg .endif
     30      1.10       mrg 
     31      1.10       mrg .if ${REALCRASH} != "no"	# {
     32       1.1        ad 
     33       1.7  christos S=		${.CURDIR}/../../sys
     34       1.1        ad 
     35       1.1        ad CPPFLAGS+=	-I${.CURDIR} -I${.OBJDIR} -I${S} -fno-strict-aliasing
     36       1.1        ad CPPFLAGS+=	-DDDB_VERBOSE_HELP -DDB_MAX_LINE=10000000 -D_KMEMUSER
     37       1.8       mrg CPPFLAGS+=	-UDB_MACHINE_COMMANDS
     38       1.1        ad 
     39       1.1        ad # ddb files from kernel
     40       1.1        ad .PATH:	$S/ddb
     41       1.1        ad SRCS+=	db_command.c db_lwp.c db_proc.c db_xxx.c db_cpu.c
     42       1.1        ad SRCS+=	db_access.c db_elf.c db_examine.c
     43       1.1        ad SRCS+=	db_expr.c db_lex.c db_output.c db_print.c
     44       1.1        ad SRCS+=	db_sym.c db_variables.c db_write_cmd.c
     45       1.1        ad 
     46       1.7  christos .PATH:	${S}/arch/${MACHINE}/${MACHINE}
     47      1.15     skrll .PATH:	${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
     48      1.10       mrg SRCS+=	db_disasm.c
     49       1.7  christos 
     50      1.17  christos CPPFLAGS+=	-I${S}/arch
     51      1.17  christos 
     52      1.10       mrg . if    ${MACHINE} == "amd64" \
     53      1.10       mrg      || ${MACHINE} == "i386"
     54      1.11  christos MACHINE_FAMILY = x86
     55  1.22.2.2       tls . elif    ${MACHINE} == "sparc64" \
     56  1.22.2.2       tls      || ${MACHINE} == "sparc64"
     57  1.22.2.2       tls MACHINE_FAMILY = sparc
     58      1.11  christos . else
     59  1.22.2.3       tls MACHINE_FAMILY = ${MACHINE_CPU}
     60      1.10       mrg . endif
     61      1.10       mrg 
     62  1.22.2.3       tls .if ${MACHINE_CPU} == "arm"
     63      1.17  christos .PATH:	${S}/arch/arm/arm32
     64      1.22     skrll SRCS+=disassem.c cpufunc_asm.S
     65      1.17  christos .endif
     66       1.1        ad 
     67      1.17  christos .PATH:	${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY}
     68      1.16   mlelstv 
     69       1.1        ad # crash main source
     70       1.1        ad SRCS+=	crash.c
     71       1.1        ad 
     72       1.1        ad # arch.c
     73       1.1        ad .PATH:	${.CURDIR}/arch
     74      1.11  christos . if (exists(${.CURDIR}/arch/${MACHINE_FAMILY}.c))
     75      1.11  christos SRCS+=	${MACHINE_FAMILY}.c
     76       1.7  christos . else
     77       1.1        ad SRCS+=	generic.c
     78       1.7  christos . endif
     79       1.1        ad 
     80      1.13  christos COPTS.db_output.c += -Wno-format-nonliteral
     81      1.13  christos 
     82       1.1        ad # vers.c
     83       1.1        ad SRCS+=	vers.c
     84  1.22.2.1       tls vers.c:	${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS}
     85      1.18  christos 	${HOST_SH} ${S}/conf/newvers.sh -r -n
     86       1.1        ad CLEANFILES+=	vers.c version
     87       1.1        ad 
     88      1.10       mrg .else				# } {
     89      1.10       mrg 
     90      1.10       mrg SRCS+=	unsupported.c
     91      1.10       mrg 
     92      1.10       mrg .endif				# }
     93       1.1        ad 
     94       1.1        ad .include <bsd.prog.mk>
     95       1.1        ad .include <bsd.klinks.mk>
     96