freebsd-skq/usr.bin/kdump/Makefile
Bryan Drewery 195aef9962 truss: Add support for utrace(2).
This uses the kdump(1) utrace support code directly until a common library
is created.

This allows malloc(3) tracing with MALLOC_CONF=utrace:true and rtld tracing
with LD_UTRACE=1.  Unknown utrace(2) data is just printed as hex.

PR:		43819 [inspired by]
Reviewed by:	jhb
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D3819
2015-10-06 21:58:38 +00:00

59 lines
1.5 KiB
Makefile

# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
.include <src.opts.mk>
.PATH: ${.CURDIR}/../ktrace
PROG= kdump
SRCS= kdump_subr.c kdump.c ioctl.c subr.c utrace.c
DPSRCS= kdump_subr.h
CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I.
.if ${MK_CASPER} != "no"
LIBADD= capsicum
CFLAGS+=-DHAVE_LIBCAPSICUM
.endif
.if ${MK_PF} != "no"
CFLAGS+=-DPF
.endif
NO_WERROR?= YES
CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h
beforedepend: ioctl.c
.if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386")
beforedepend: linux_syscalls.c
CLEANFILES+= linux_syscalls.c
kdump.o: linux_syscalls.c
linux_syscalls.c: linux_syscalls.conf
sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \
${.CURDIR}/../../sys/${MACHINE_ARCH}/linux/syscalls.master ${.CURDIR}/linux_syscalls.conf
.endif
.if (${MACHINE_ARCH} == "amd64")
beforedepend: linux32_syscalls.c
CLEANFILES+= linux32_syscalls.c
kdump.o: linux32_syscalls.c
linux32_syscalls.c: linux32_syscalls.conf
sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \
${.CURDIR}/../../sys/${MACHINE_ARCH}/linux32/syscalls.master ${.CURDIR}/linux32_syscalls.conf
.endif
ioctl.c: mkioctls
env MACHINE=${MACHINE} CPP="${CPP}" \
sh ${.CURDIR}/mkioctls print ${DESTDIR}${INCLUDEDIR} > ${.TARGET}
kdump_subr.h: mksubr
sh ${.CURDIR}/mksubr ${DESTDIR}${INCLUDEDIR} | \
sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET}
kdump_subr.c: mksubr kdump_subr.h
sh ${.CURDIR}/mksubr ${DESTDIR}${INCLUDEDIR} >${.TARGET}
.include <bsd.prog.mk>