freebsd-dev/usr.bin/kdump/Makefile
John Baldwin d6fb489498 Start on a new library (libsysdecode) that provides routines for decoding
system call information such as system call arguments.  Initially this
will consist of pulling duplicated code out of truss and kdump though it
may prove useful for other utilities in the future.

This commit moves the shared utrace(2) record parser out of kdump into
the library and updates kdump and truss to use it.  One difference from
the previous version is that the library version treats unknown events
that start with the "RTLD" signature as unknown events.  This simplifies
the interface and allows the consumer to decide how to handle all
non-recognized events.  Instead, this function only generates a string
description for known malloc() and RTLD records.

Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D4537
2015-12-15 00:05:07 +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_subr.h kdump.c ioctl.c subr.c
CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I.
LIBADD= sysdecode
.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>