1# $FreeBSD$ 2 3TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute 4.PATH: ${TRACEROUTE_DISTDIR} 5 6PROG= traceroute 7MAN= traceroute.8 8SRCS= version.c traceroute.c ifaddrlist.c findsaddr-socket.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 \ 17 -DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \ 18 -DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_ICMP_NEXTMTU=1 19.ifndef (NOIPSEC) 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.ifndef (NOIPSEC) 28DPADD= ${LIBIPSEC} 29LDADD= -lipsec 30.endif 31 32.if ${MACHINE_ARCH} == "alpha" 33# gcc builtin memcpy causes unaligned access 34CFLAGS+= -fno-builtin 35.endif 36 37CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl 38 39version.c: ${TRACEROUTE_DISTDIR}/VERSION 40 @rm -f ${.TARGET} 41 head -1 ${TRACEROUTE_DISTDIR}/VERSION | \ 42 sed -e 's/.*/char version[] = "&";/' \ 43 > ${.TARGET} 44 45.include <bsd.prog.mk> 46