1# @(#)Makefile 8.1 (Berkeley) 6/6/93 2# $FreeBSD$ 3 4.include <bsd.own.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 ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" 24SRCS+= linux_syscalls.c 25.endif 26 27NO_WERROR?= YES 28 29CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c 30 31ioctl.c: mkioctls 32 env MACHINE=${MACHINE} CPP="${CPP}" \ 33 sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include > ${.TARGET} 34 35kdump_subr.h: mksubr 36 sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \ 37 sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET} 38 39kdump_subr.c: mksubr kdump_subr.h 40 sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET} 41 42linux_syscalls.c: 43 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ 44 ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux${SFX}/syscalls.master ${.CURDIR}/linux_syscalls.conf 45 echo "int nlinux_syscalls = sizeof(linux_syscallnames) / sizeof(linux_syscallnames[0]);" \ 46 >> linux_syscalls.c 47 48.include <bsd.prog.mk> 49