xref: /freebsd/usr.bin/kdump/Makefile (revision bb15ca603fa442c72dde3f3cb8b46db6970e3950)
1#	@(#)Makefile	8.1 (Berkeley) 6/6/93
2# $FreeBSD$
3
4.if (${MACHINE_ARCH} == "amd64")
5SFX=		32
6.endif
7
8.PATH: ${.CURDIR}/../ktrace
9
10PROG=		kdump
11SRCS=		kdump_subr.c kdump.c ioctl.c subr.c
12DPSRCS=		kdump_subr.h
13CFLAGS+=	-I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I.
14
15.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
16SRCS+=		linux_syscalls.c
17.endif
18
19NO_WERROR?=	YES
20
21CLEANFILES=	ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c
22
23ioctl.c: mkioctls
24	env MACHINE=${MACHINE} \
25	    sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include > ${.TARGET}
26
27kdump_subr.h: mksubr
28	sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \
29	    sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET}
30
31kdump_subr.c: mksubr kdump_subr.h
32	sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET}
33
34linux_syscalls.c:
35	/bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \
36	    ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux${SFX}/syscalls.master ${.CURDIR}/linux_syscalls.conf
37	echo "int nlinux_syscalls = sizeof(linux_syscallnames) / sizeof(linux_syscallnames[0]);" \
38	    >> linux_syscalls.c
39
40.include <bsd.prog.mk>
41