1# $OpenBSD: Makefile,v 1.1 2019/04/23 02:32:17 guenther Exp $
2
3PROG=	dump_tables
4LDADD=	-lkvm
5DPADD=	${LIBKVM}
6CFLAGS+=-I.
7
8REGRESS_TARGETS=
9
10PMAP_H=	/usr/include/machine/pmap.h
11SPMAP_H=struct_pmap.h
12
13dump_tables.o: ${SPMAP_H}
14
15s=[[:space:]]
16${SPMAP_H}: ${PMAP_H}
17	sed -nE -e '/^struct$s+pmap$s*\{/,/^}/p' \
18		-e '/^$s*#$s*define$s+PMAP_DIRECT_(UN)?MAP\(/p' \
19	    ${PMAP_H} >$@
20
21CLEANFILES+=${SPMAP_H}
22
23.include <bsd.regress.mk>
24