1994-05-27 12:33:43 +00:00
|
|
|
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
1999-12-02 13:47:17 +00:00
|
|
|
# $FreeBSD$
|
1994-05-27 12:33:43 +00:00
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2013-12-15 23:49:42 +00:00
|
|
|
|
2011-03-01 16:42:28 +00:00
|
|
|
.if (${MACHINE_ARCH} == "amd64")
|
|
|
|
SFX= 32
|
|
|
|
.endif
|
|
|
|
|
2002-07-23 09:15:45 +00:00
|
|
|
.PATH: ${.CURDIR}/../ktrace
|
2002-06-21 10:21:21 +00:00
|
|
|
|
2002-06-21 11:06:11 +00:00
|
|
|
PROG= kdump
|
2011-10-08 12:59:41 +00:00
|
|
|
SRCS= kdump_subr.c kdump.c ioctl.c subr.c
|
|
|
|
DPSRCS= kdump_subr.h
|
2011-10-08 09:57:29 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I.
|
1994-05-27 12:33:43 +00:00
|
|
|
|
2013-12-15 23:09:05 +00:00
|
|
|
.if ${MK_CASPER} != "no"
|
|
|
|
DPADD+= ${LIBCAPSICUM} ${LIBNV}
|
|
|
|
LDADD+= -lcapsicum -lnv
|
|
|
|
CFLAGS+=-DHAVE_LIBCAPSICUM
|
|
|
|
.endif
|
|
|
|
|
2014-02-12 09:59:48 +00:00
|
|
|
.if ${MK_PF} != "no"
|
|
|
|
CFLAGS+=-DPF
|
|
|
|
.endif
|
|
|
|
|
2011-03-01 16:42:28 +00:00
|
|
|
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
|
|
|
SRCS+= linux_syscalls.c
|
|
|
|
.endif
|
|
|
|
|
2011-10-12 21:45:12 +00:00
|
|
|
NO_WERROR?= YES
|
2010-01-02 10:27:05 +00:00
|
|
|
|
2011-10-12 21:45:12 +00:00
|
|
|
CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c
|
2002-06-21 10:21:21 +00:00
|
|
|
|
2002-07-23 09:15:45 +00:00
|
|
|
ioctl.c: mkioctls
|
2012-04-09 14:47:18 +00:00
|
|
|
env MACHINE=${MACHINE} CPP="${CPP}" \
|
2011-10-21 11:08:25 +00:00
|
|
|
sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include > ${.TARGET}
|
1994-05-27 12:33:43 +00:00
|
|
|
|
2011-10-08 09:57:29 +00:00
|
|
|
kdump_subr.h: mksubr
|
|
|
|
sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \
|
|
|
|
sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET}
|
|
|
|
|
|
|
|
kdump_subr.c: mksubr kdump_subr.h
|
|
|
|
sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET}
|
|
|
|
|
2011-03-01 16:42:28 +00:00
|
|
|
linux_syscalls.c:
|
|
|
|
/bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \
|
|
|
|
${.CURDIR}/../../sys/${MACHINE_ARCH}/linux${SFX}/syscalls.master ${.CURDIR}/linux_syscalls.conf
|
|
|
|
echo "int nlinux_syscalls = sizeof(linux_syscallnames) / sizeof(linux_syscallnames[0]);" \
|
|
|
|
>> linux_syscalls.c
|
|
|
|
|
1994-05-27 12:33:43 +00:00
|
|
|
.include <bsd.prog.mk>
|