freebsd-skq/usr.bin/kdump/Makefile
jhb b665ac0758 Move the mkioctls script to libsysdecode and use it to generate a
sysdecode_ioctlname() function.  This function matches the behavior
of the truss variant in that it returns a pointer to a string description
for known ioctls.  The caller is responsible for displaying unknown
ioctl requests.  For kdump this meant moving the logic to handle unknown
ioctl requests out of the generated function and into an ioctlname()
function in kdump.c instead.

Differential Revision:	https://reviews.freebsd.org/D4610
2015-12-22 20:33:49 +00:00

49 lines
1.3 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 subr.c
CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I.
LIBADD= sysdecode
.if ${MK_CASPER} != "no"
LIBADD+= capsicum
CFLAGS+=-DHAVE_LIBCAPSICUM
.endif
NO_WERROR?= YES
CLEANFILES= kdump_subr.c kdump_subr.h
.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
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>