Home | History | Annotate | Line # | Download | only in crash
Makefile revision 1.13.2.3
      1  1.13.2.3      yamt #	$NetBSD: Makefile,v 1.13.2.3 2013/01/16 05:34:08 yamt 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.13.2.1      yamt 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.13.2.1      yamt     || ${MACHINE} == "hp700" \
     16      1.10       mrg     || ${MACHINE} == "i386" \
     17  1.13.2.1      yamt     || ${MACHINE} == "sparc64" \
     18  1.13.2.1      yamt     || (${MACHINE_ARCH} == "arm" && ${MACHINE} != "acorn26") \
     19  1.13.2.1      yamt     || ${MACHINE_ARCH} == "m68k"
     20  1.13.2.1      yamt SRCS+=	db_trace.c
     21  1.13.2.1      yamt .if ${MACHINE_ARCH} != "m68k"
     22  1.13.2.1      yamt SRCS+=	db_machdep.c
     23  1.13.2.1      yamt .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.13.2.1      yamt .PATH:	${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
     46      1.10       mrg SRCS+=	db_disasm.c
     47       1.7  christos 
     48  1.13.2.1      yamt CPPFLAGS+=	-I${S}/arch
     49  1.13.2.1      yamt 
     50      1.10       mrg . if    ${MACHINE} == "amd64" \
     51      1.10       mrg      || ${MACHINE} == "i386"
     52      1.11  christos MACHINE_FAMILY = x86
     53  1.13.2.1      yamt . elif  ${MACHINE_ARCH} == "m68k" \
     54  1.13.2.1      yamt      || ${MACHINE_ARCH} == "arm"
     55  1.13.2.1      yamt 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.13.2.1      yamt .if ${MACHINE_ARCH} == "arm"
     61  1.13.2.1      yamt .PATH:	${S}/arch/arm/arm32
     62  1.13.2.2      yamt SRCS+=disassem.c cpufunc_asm.S
     63  1.13.2.1      yamt .endif
     64  1.13.2.1      yamt 
     65  1.13.2.1      yamt .PATH:	${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY}
     66       1.1        ad 
     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.13.2.3      yamt vers.c:	${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS}
     83  1.13.2.1      yamt 	${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