Makefile revision 139125
164987Smsmith# $FreeBSD: head/usr.sbin/traceroute/Makefile 139125 2004-12-21 12:44:20Z ru $
264987Smsmith
364987SmsmithTRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute
464987Smsmith.PATH: ${TRACEROUTE_DISTDIR}
564987Smsmith
664987SmsmithPROG=	traceroute
764987SmsmithMAN=	traceroute.8
864987SmsmithSRCS=	version.c traceroute.c ifaddrlist.c findsaddr-socket.c
964987SmsmithBINOWN=	root
1064987SmsmithBINMODE=4555
1164987SmsmithCLEANFILES=	version.c
1264987Smsmith
1364987SmsmithCFLAGS+= -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1 \
1464987Smsmith	 -DHAVE_NET_ROUTE_H=1 -DHAVE_NET_IF_DL_H=1 \
1564987Smsmith	 -DHAVE_STRERROR=1 -DHAVE_USLEEP=1 \
1664987Smsmith	 -DHAVE_SYS_SYSCTL_H=1 \
1764987Smsmith	 -DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \
1864987Smsmith	 -DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_ICMP_NEXTMTU=1
1964987Smsmith.if !defined(TRACEROUTE_NO_IPSEC)
2064987SmsmithCFLAGS+= -DIPSEC
2164987Smsmith.endif
2264987Smsmith# RTT Jitter on the internet these days means printing 3 decimal places on
2364987Smsmith# > 1000ms times is plain useless.  Uncomment this to enable variable precision
2464987Smsmith# reporting, ie: print a variable precision from 0.001ms through 1000ms
2564987Smsmith# CFLAGS+= -DSANE_PRECISION
2664987Smsmith
2764987Smsmith.if !defined(TRACEROUTE_NO_IPSEC)
2864987SmsmithDPADD=	${LIBIPSEC}
2964987SmsmithLDADD=	-lipsec
3064987Smsmith.endif
3164987Smsmith
3264987Smsmith.if ${MACHINE_ARCH} == "alpha"
3364987Smsmith# gcc builtin memcpy causes unaligned access
3464987SmsmithCFLAGS+= -fno-builtin
3564987Smsmith.endif
3664987Smsmith
3764987SmsmithCFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl
3864987Smsmith
3964987Smsmithversion.c: ${TRACEROUTE_DISTDIR}/VERSION
4064987Smsmith	@rm -f ${.TARGET}
4164987Smsmith	head -1 ${TRACEROUTE_DISTDIR}/VERSION | \
4264987Smsmith	    sed -e 's/.*/char version[] = "&";/' \
4364987Smsmith	    > ${.TARGET}
4464987Smsmith
4564987Smsmith.include <bsd.prog.mk>
4664987Smsmith