1# @(#)Makefile 8.1 (Berkeley) 6/6/93 2# $FreeBSD$ 3 4.include <src.opts.mk> 5 6.if (${MACHINE_ARCH} == "amd64") 7SFX= 32 8.endif 9 10.PATH: ${.CURDIR}/../ktrace 11 12PROG= kdump 13SRCS= kdump_subr.c kdump.c ioctl.c subr.c 14DPSRCS= kdump_subr.h 15CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. 16 17.if ${MK_CASPER} != "no" 18DPADD+= ${LIBCAPSICUM} ${LIBNV} 19LDADD+= -lcapsicum -lnv 20CFLAGS+=-DHAVE_LIBCAPSICUM 21.endif 22 23.if ${MK_PF} != "no" 24CFLAGS+=-DPF 25.endif 26 27.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" 28SRCS+= linux_syscalls.c 29.endif 30 31NO_WERROR?= YES 32 33CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c 34 35ioctl.c: mkioctls 36 env MACHINE=${MACHINE} CPP="${CPP}" \ 37 sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include > ${.TARGET} 38 39kdump_subr.h: mksubr 40 sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \ 41 sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET} 42 43kdump_subr.c: mksubr kdump_subr.h 44 sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET} 45 46linux_syscalls.c: 47 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ 48 ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux${SFX}/syscalls.master ${.CURDIR}/linux_syscalls.conf 49 echo "int nlinux_syscalls = sizeof(linux_syscallnames) / sizeof(linux_syscallnames[0]);" \ 50 >> linux_syscalls.c 51 52.include <bsd.prog.mk> 53