xref: /titanic_52/usr/src/cmd/cmd-inet/usr.sbin/traceroute/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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# @(#) $Header: Makefile.in,v 1.24 97/04/22 13:31:20 leres Exp $ (LBL)
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gatePROG=		traceroute
280406ceaaSmeemOBJS=		traceroute.o traceroute_aux.o traceroute_aux6.o
290406ceaaSmeemSRCS=		$(OBJS:.o=.c)
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateinclude	../../../Makefile.cmd
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/traceroute	:=	FILEMODE= 04555
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gate# Traceroute uses the ancillary data feature which is available only through
367c478bd9Sstevel@tonic-gate# UNIX 98 standards version of Socket interface. This interface is supposed to
377c478bd9Sstevel@tonic-gate# be accessed by -lxnet. In addition -lsocket and -lnsl are used to
387c478bd9Sstevel@tonic-gate# capture new not-yet-standard interfaces. Someday -lxnet alone should be enough
397c478bd9Sstevel@tonic-gate# when IPv6 inspired new interfaces are part of standards.
400406ceaaSmeemLDLIBS +=	-lxnet -lsocket -lnsl -linetutil
417c478bd9Sstevel@tonic-gate
420406ceaaSmeem# These #defines are required to use UNIX 98 interfaces
430406ceaaSmeemCPPFLAGS += -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gate#
467c478bd9Sstevel@tonic-gate# Setting the above defines to use the UNIX98 ancillary data feature
477c478bd9Sstevel@tonic-gate# causes lint to output warnings about lint library declarations
487c478bd9Sstevel@tonic-gate# conflicting with those in the header files. Since we need these
497c478bd9Sstevel@tonic-gate# features, the best course of action is to switch the types of the
507c478bd9Sstevel@tonic-gate# resulting warnings off when running lint.
517c478bd9Sstevel@tonic-gate#
527c478bd9Sstevel@tonic-gateLINTFLAGS +=	-erroff=E_FUNC_DECL_VAR_ARG2 -erroff=E_INCONS_ARG_DECL2 \
537c478bd9Sstevel@tonic-gate		-erroff=E_INCONS_ARG_USED2 -erroff=E_INCONS_VAL_TYPE_DECL2
547c478bd9Sstevel@tonic-gate
55*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
56*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-clobbered
57*7014882cSRichard Lowe
587c478bd9Sstevel@tonic-gate.KEEP_STATE:
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gateall:	$(PROG)
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gate$(PROG): $(OBJS)
637c478bd9Sstevel@tonic-gate	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
647c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gateinstall: all $(ROOTUSRSBINPROG)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateclean:
697c478bd9Sstevel@tonic-gate	$(RM) $(OBJS)
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gatelint:	lint_SRCS
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ
74