xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.sbin/traceroute/Makefile (revision 10207:87c40ea3fc4b)
10Sstevel@tonic-gate#
2*10207SJames.McPherson@Sun.COM# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
30Sstevel@tonic-gate# Use is subject to license terms.
40Sstevel@tonic-gate#
50Sstevel@tonic-gate
60Sstevel@tonic-gate#  Copyright (c) 1988, 1989, 1990, 1991, 1992, 1995, 1996, 1997
70Sstevel@tonic-gate# 	The Regents of the University of California.  All rights reserved.
80Sstevel@tonic-gate#
90Sstevel@tonic-gate#  Redistribution and use in source and binary forms, with or without
100Sstevel@tonic-gate#  modification, are permitted provided that: (1) source code distributions
110Sstevel@tonic-gate#  retain the above copyright notice and this paragraph in its entirety, (2)
120Sstevel@tonic-gate#  distributions including binary code include the above copyright notice and
130Sstevel@tonic-gate#  this paragraph in its entirety in the documentation or other materials
140Sstevel@tonic-gate#  provided with the distribution, and (3) all advertising materials mentioning
150Sstevel@tonic-gate#  features or use of this software display the following acknowledgement:
160Sstevel@tonic-gate#  ``This product includes software developed by the University of California,
170Sstevel@tonic-gate#  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
180Sstevel@tonic-gate#  the University nor the names of its contributors may be used to endorse
190Sstevel@tonic-gate#  or promote products derived from this software without specific prior
200Sstevel@tonic-gate#  written permission.
210Sstevel@tonic-gate#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
220Sstevel@tonic-gate#  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
230Sstevel@tonic-gate#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate# @(#) $Header: Makefile.in,v 1.24 97/04/22 13:31:20 leres Exp $ (LBL)
260Sstevel@tonic-gate
270Sstevel@tonic-gatePROG=		traceroute
281254SmeemOBJS=		traceroute.o traceroute_aux.o traceroute_aux6.o
291254SmeemSRCS=		$(OBJS:.o=.c)
300Sstevel@tonic-gate
310Sstevel@tonic-gateinclude	../../../Makefile.cmd
320Sstevel@tonic-gate
330Sstevel@tonic-gate$(ROOTUSRSBIN)/traceroute	:=	FILEMODE= 04555
340Sstevel@tonic-gate
350Sstevel@tonic-gate# Traceroute uses the ancillary data feature which is available only through
360Sstevel@tonic-gate# UNIX 98 standards version of Socket interface. This interface is supposed to
370Sstevel@tonic-gate# be accessed by -lxnet. In addition -lsocket and -lnsl are used to
380Sstevel@tonic-gate# capture new not-yet-standard interfaces. Someday -lxnet alone should be enough
390Sstevel@tonic-gate# when IPv6 inspired new interfaces are part of standards.
401254SmeemLDLIBS +=	-lxnet -lsocket -lnsl -linetutil
410Sstevel@tonic-gate
421254Smeem# These #defines are required to use UNIX 98 interfaces
431254SmeemCPPFLAGS += -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
440Sstevel@tonic-gate
450Sstevel@tonic-gate#
460Sstevel@tonic-gate# Setting the above defines to use the UNIX98 ancillary data feature
470Sstevel@tonic-gate# causes lint to output warnings about lint library declarations
480Sstevel@tonic-gate# conflicting with those in the header files. Since we need these
490Sstevel@tonic-gate# features, the best course of action is to switch the types of the
500Sstevel@tonic-gate# resulting warnings off when running lint.
510Sstevel@tonic-gate#
520Sstevel@tonic-gateLINTFLAGS +=	-erroff=E_FUNC_DECL_VAR_ARG2 -erroff=E_INCONS_ARG_DECL2 \
530Sstevel@tonic-gate		-erroff=E_INCONS_ARG_USED2 -erroff=E_INCONS_VAL_TYPE_DECL2
540Sstevel@tonic-gate
550Sstevel@tonic-gate.KEEP_STATE:
560Sstevel@tonic-gate
570Sstevel@tonic-gateall:	$(PROG)
580Sstevel@tonic-gate
590Sstevel@tonic-gate$(PROG): $(OBJS)
600Sstevel@tonic-gate	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
610Sstevel@tonic-gate	$(POST_PROCESS)
620Sstevel@tonic-gate
630Sstevel@tonic-gateinstall: all $(ROOTUSRSBINPROG)
640Sstevel@tonic-gate
650Sstevel@tonic-gateclean:
660Sstevel@tonic-gate	$(RM) $(OBJS)
670Sstevel@tonic-gate
680Sstevel@tonic-gatelint:	lint_SRCS
690Sstevel@tonic-gate
700Sstevel@tonic-gateinclude ../../../Makefile.targ
71