1#	$OpenBSD: Makefile,v 1.4 2016/07/18 09:37:50 guenther Exp $
2
3PROG=	moptrace
4SRCS=	moptrace.c print.c cmp.c get.c mopdef.c nma.c device.c version.c pf.c \
5	loop-bsd.c dl.c rc.c
6MAN=	moptrace.1
7CFLAGS+= -I${.CURDIR} -I${.CURDIR}/.. -I${.CURDIR}/../common
8CLEANFILES= version.c version.h
9.PATH:	${.CURDIR}/../common
10
11version.c version.h: ${.CURDIR}/../common/VERSION
12	rm -f version.c; \
13	sed 's/.*/char version[] = "&";/' ${.ALLSRC} > version.c
14	set `sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \2/' ${.ALLSRC}` ; \
15		{ echo '#define VERSION_MAJOR' $$1 ; \
16		  echo '#define VERSION_MINOR' $$2 ; } > version.h
17
18
19.include <bsd.prog.mk>
20