xref: /freebsd/usr.sbin/traceroute/Makefile (revision 7afb8adff33d47f10a11368ff54bb2eec5b30165)
1# $FreeBSD$
2
3TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute
4.PATH: ${TRACEROUTE_DISTDIR}
5
6PROG=	traceroute
7MAN=	traceroute.8
8SRCS=	as.c version.c traceroute.c ifaddrlist.c findsaddr-udp.c
9BINOWN=	root
10BINMODE=4555
11CLEANFILES=	version.c
12
13CFLAGS+= -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1 \
14	 -DHAVE_NET_ROUTE_H=1 -DHAVE_NET_IF_DL_H=1 \
15	 -DHAVE_STRERROR=1 -DHAVE_USLEEP=1 \
16	 -DHAVE_SYS_SYSCTL_H=1 -DBYTESWAP_IP_HDR=1 \
17	 -DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \
18	 -DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_ICMP_NEXTMTU=1
19.if !defined(TRACEROUTE_NO_IPSEC)
20CFLAGS+= -DIPSEC
21.endif
22# RTT Jitter on the internet these days means printing 3 decimal places on
23# > 1000ms times is plain useless.  Uncomment this to enable variable precision
24# reporting, ie: print a variable precision from 0.001ms through 1000ms
25# CFLAGS+= -DSANE_PRECISION
26
27.if !defined(TRACEROUTE_NO_IPSEC)
28LIBADD+=	ipsec
29.endif
30
31CFLAGS+= -I${TRACEROUTE_DISTDIR}
32
33WARNS?=	3
34
35version.c: ${TRACEROUTE_DISTDIR}/VERSION
36	@rm -f ${.TARGET}
37	head -1 ${TRACEROUTE_DISTDIR}/VERSION | \
38	    sed -e 's/.*/char version[] = "&";/' \
39	    > ${.TARGET}
40
41.include <bsd.prog.mk>
42