Merge branch 'vendor/TCPDUMP'
[dragonfly.git] / usr.sbin / tcpdump / tcpslice / Makefile
1 #       @(#)Makefile    0.1 (RWGrimes) 3/24/93
2 # $FreeBSD: src/usr.sbin/tcpdump/tcpslice/Makefile,v 1.10.6.1 2001/04/25 12:11:03 ru Exp $
3 # $DragonFly: src/usr.sbin/tcpdump/tcpslice/Makefile,v 1.4 2006/12/25 00:42:01 pavalos Exp $
4
5 PROG=   tcpslice
6 CFLAGS+= -I.
7 SRCS=   gwtm2secs.c search.c tcpslice.c util.c version.c version.h
8 CLEANFILES+=    version.c version.h
9 DPADD+= ${LIBPCAP}
10 LDADD+= -lpcap
11
12 TCPDUMP_DISTDIR?= ${.CURDIR}/../../../contrib/tcpdump
13
14 .ORDER: version.c version.h
15 version.c version.h: ${TCPDUMP_DISTDIR}/VERSION
16         rm -f version.c ; \
17         sed 's/.*/char version[] = "&";/' ${TCPDUMP_DISTDIR}/VERSION > version.c
18         set `sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \2/' ${TCPDUMP_DISTDIR}/VERSION` ; \
19                 { echo '#define VERSION_MAJOR' $$1 ; \
20                   echo '#define VERSION_MINOR' $$2 ; } > version.h
21
22 .include <bsd.prog.mk>