Home | History | Annotate | Line # | Download | only in crash
Makefile revision 1.39.2.1
      1  1.39.2.1  pgoyette #	$NetBSD: Makefile,v 1.39.2.1 2018/05/21 04:36:19 pgoyette 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.27     skrll .include <bsd.own.mk>
     13      1.27     skrll 
     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.25     skrll     || ${MACHINE} == "hppa" \
     18      1.10       mrg     || ${MACHINE} == "i386" \
     19      1.32       mrg     || ${MACHINE} == "sparc" \
     20      1.16   mlelstv     || ${MACHINE} == "sparc64" \
     21      1.38     skrll     || ${MACHINE_CPU} == "arm" \
     22      1.16   mlelstv     || ${MACHINE_ARCH} == "m68k"
     23      1.17  christos SRCS+=	db_trace.c
     24      1.37  nakayama .if ${MACHINE_ARCH} != "m68k"
     25      1.17  christos SRCS+=	db_machdep.c
     26      1.21  christos .endif
     27      1.10       mrg REALCRASH=yes
     28       1.1        ad .else
     29      1.10       mrg REALCRASH=no
     30      1.10       mrg .endif
     31      1.10       mrg 
     32      1.10       mrg .if ${REALCRASH} != "no"	# {
     33       1.1        ad 
     34       1.7  christos S=		${.CURDIR}/../../sys
     35       1.1        ad 
     36       1.1        ad CPPFLAGS+=	-I${.CURDIR} -I${.OBJDIR} -I${S} -fno-strict-aliasing
     37       1.1        ad CPPFLAGS+=	-DDDB_VERBOSE_HELP -DDB_MAX_LINE=10000000 -D_KMEMUSER
     38      1.31  christos CPPFLAGS+=	-UDB_MACHINE_COMMANDS
     39       1.1        ad 
     40       1.1        ad # ddb files from kernel
     41       1.1        ad .PATH:	$S/ddb
     42       1.1        ad SRCS+=	db_command.c db_lwp.c db_proc.c db_xxx.c db_cpu.c
     43      1.39   mlelstv SRCS+=  db_autoconf.c
     44       1.1        ad SRCS+=	db_access.c db_elf.c db_examine.c
     45       1.1        ad SRCS+=	db_expr.c db_lex.c db_output.c db_print.c
     46       1.1        ad SRCS+=	db_sym.c db_variables.c db_write_cmd.c
     47       1.1        ad 
     48       1.7  christos .PATH:	${S}/arch/${MACHINE}/${MACHINE}
     49      1.15     skrll .PATH:	${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
     50      1.10       mrg SRCS+=	db_disasm.c
     51       1.7  christos 
     52      1.28  christos .PATH:  $S/kern
     53      1.28  christos SRCS+=	kern_timeout.c
     54      1.29  christos CPPFLAGS.kern_timeout.c += -DCRASH -DDDB
     55      1.28  christos 
     56      1.17  christos CPPFLAGS+=	-I${S}/arch
     57      1.17  christos 
     58      1.10       mrg . if    ${MACHINE} == "amd64" \
     59      1.10       mrg      || ${MACHINE} == "i386"
     60      1.11  christos MACHINE_FAMILY = x86
     61      1.32       mrg . elif  ${MACHINE} == "sparc64"
     62      1.24  christos MACHINE_FAMILY = sparc
     63      1.11  christos . else
     64      1.27     skrll MACHINE_FAMILY = ${MACHINE_CPU}
     65      1.10       mrg . endif
     66      1.10       mrg 
     67      1.27     skrll .if ${MACHINE_CPU} == "arm"
     68      1.17  christos .PATH:	${S}/arch/arm/arm32
     69      1.22     skrll SRCS+=disassem.c cpufunc_asm.S
     70      1.17  christos .endif
     71       1.1        ad 
     72      1.17  christos .PATH:	${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY}
     73      1.16   mlelstv 
     74       1.1        ad # crash main source
     75       1.1        ad SRCS+=	crash.c
     76       1.1        ad 
     77       1.1        ad # arch.c
     78       1.1        ad .PATH:	${.CURDIR}/arch
     79      1.11  christos . if (exists(${.CURDIR}/arch/${MACHINE_FAMILY}.c))
     80      1.11  christos SRCS+=	${MACHINE_FAMILY}.c
     81       1.7  christos . else
     82       1.1        ad SRCS+=	generic.c
     83       1.7  christos . endif
     84       1.1        ad 
     85      1.13  christos COPTS.db_output.c += -Wno-format-nonliteral
     86      1.13  christos 
     87  1.39.2.1  pgoyette .if ${MKREPRO} == "yes"
     88  1.39.2.1  pgoyette .       if ${MKREPRO_TIMESTAMP:U0} != 0
     89  1.39.2.1  pgoyette NVFLAGS+=-r ${MKREPRO_TIMESTAMP}
     90  1.39.2.1  pgoyette .       else
     91  1.39.2.1  pgoyette NVFLAGS+=-R
     92  1.39.2.1  pgoyette .       endif
     93  1.39.2.1  pgoyette .endif
     94  1.39.2.1  pgoyette 
     95       1.1        ad # vers.c
     96       1.1        ad SRCS+=	vers.c
     97      1.23       apb vers.c:	${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS}
     98  1.39.2.1  pgoyette 	${HOST_SH} ${S}/conf/newvers.sh ${NVFLAGS} -n -m ${MACHINE} -i CRASH
     99       1.1        ad CLEANFILES+=	vers.c version
    100       1.1        ad 
    101      1.10       mrg .else				# } {
    102      1.10       mrg 
    103      1.10       mrg SRCS+=	unsupported.c
    104      1.10       mrg 
    105      1.10       mrg .endif				# }
    106       1.1        ad 
    107      1.36  christos .if  ${MACHINE} == "sparc" \
    108      1.36  christos     || ${MACHINE} == "sparc64"
    109      1.34  christos COPTS.kern_timeout.c += -Wno-stack-protector
    110      1.36  christos .endif
    111      1.34  christos 
    112      1.33       mrg .include "../../compat/exec.mk"
    113      1.33       mrg 
    114       1.1        ad .include <bsd.prog.mk>
    115       1.1        ad .include <bsd.klinks.mk>
    116