xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/traceroute/Makefile (revision d17be682a2c70b4505d43c830bbd2603da11918d)
17c478bd9Sstevel@tonic-gate#
224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37c478bd9Sstevel@tonic-gate# Use is subject to license terms.
47c478bd9Sstevel@tonic-gate#
57c478bd9Sstevel@tonic-gate
67c478bd9Sstevel@tonic-gate#  Copyright (c) 1988, 1989, 1990, 1991, 1992, 1995, 1996, 1997
77c478bd9Sstevel@tonic-gate#	The Regents of the University of California.  All rights reserved.
87c478bd9Sstevel@tonic-gate#
97c478bd9Sstevel@tonic-gate#  Redistribution and use in source and binary forms, with or without
107c478bd9Sstevel@tonic-gate#  modification, are permitted provided that: (1) source code distributions
117c478bd9Sstevel@tonic-gate#  retain the above copyright notice and this paragraph in its entirety, (2)
127c478bd9Sstevel@tonic-gate#  distributions including binary code include the above copyright notice and
137c478bd9Sstevel@tonic-gate#  this paragraph in its entirety in the documentation or other materials
147c478bd9Sstevel@tonic-gate#  provided with the distribution, and (3) all advertising materials mentioning
157c478bd9Sstevel@tonic-gate#  features or use of this software display the following acknowledgement:
167c478bd9Sstevel@tonic-gate#  ``This product includes software developed by the University of California,
177c478bd9Sstevel@tonic-gate#  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
187c478bd9Sstevel@tonic-gate#  the University nor the names of its contributors may be used to endorse
197c478bd9Sstevel@tonic-gate#  or promote products derived from this software without specific prior
207c478bd9Sstevel@tonic-gate#  written permission.
217c478bd9Sstevel@tonic-gate#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
227c478bd9Sstevel@tonic-gate#  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
237c478bd9Sstevel@tonic-gate#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gatePROG=		traceroute
270406ceaaSmeemOBJS=		traceroute.o traceroute_aux.o traceroute_aux6.o
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateinclude	../../../Makefile.cmd
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/traceroute	:=	FILEMODE= 04555
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate# Traceroute uses the ancillary data feature which is available only through
347c478bd9Sstevel@tonic-gate# UNIX 98 standards version of Socket interface. This interface is supposed to
358a7aa2a5SYuri Pankov# be accessed by -lxnet. In addition -lsocket is used to
367c478bd9Sstevel@tonic-gate# capture new not-yet-standard interfaces. Someday -lxnet alone should be enough
377c478bd9Sstevel@tonic-gate# when IPv6 inspired new interfaces are part of standards.
388a7aa2a5SYuri PankovLDLIBS +=	-lxnet -lsocket -linetutil
397c478bd9Sstevel@tonic-gate
400406ceaaSmeem# These #defines are required to use UNIX 98 interfaces
410406ceaaSmeemCPPFLAGS += -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
427c478bd9Sstevel@tonic-gate
43*d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
447014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-clobbered
457014882cSRichard Lowe
467c478bd9Sstevel@tonic-gate.KEEP_STATE:
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gateall:	$(PROG)
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gate$(PROG): $(OBJS)
517c478bd9Sstevel@tonic-gate	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
527c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gateinstall: all $(ROOTUSRSBINPROG)
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gateclean:
577c478bd9Sstevel@tonic-gate	$(RM) $(OBJS)
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ
60