1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# Copyright 2003 Sun Microsystems, Inc. All rights reserved. 3*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 4*7c478bd9Sstevel@tonic-gate# 5*7c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 6*7c478bd9Sstevel@tonic-gate# 7*7c478bd9Sstevel@tonic-gate 8*7c478bd9Sstevel@tonic-gate# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1995, 1996, 1997 9*7c478bd9Sstevel@tonic-gate# The Regents of the University of California. All rights reserved. 10*7c478bd9Sstevel@tonic-gate# 11*7c478bd9Sstevel@tonic-gate# Redistribution and use in source and binary forms, with or without 12*7c478bd9Sstevel@tonic-gate# modification, are permitted provided that: (1) source code distributions 13*7c478bd9Sstevel@tonic-gate# retain the above copyright notice and this paragraph in its entirety, (2) 14*7c478bd9Sstevel@tonic-gate# distributions including binary code include the above copyright notice and 15*7c478bd9Sstevel@tonic-gate# this paragraph in its entirety in the documentation or other materials 16*7c478bd9Sstevel@tonic-gate# provided with the distribution, and (3) all advertising materials mentioning 17*7c478bd9Sstevel@tonic-gate# features or use of this software display the following acknowledgement: 18*7c478bd9Sstevel@tonic-gate# ``This product includes software developed by the University of California, 19*7c478bd9Sstevel@tonic-gate# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 20*7c478bd9Sstevel@tonic-gate# the University nor the names of its contributors may be used to endorse 21*7c478bd9Sstevel@tonic-gate# or promote products derived from this software without specific prior 22*7c478bd9Sstevel@tonic-gate# written permission. 23*7c478bd9Sstevel@tonic-gate# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 24*7c478bd9Sstevel@tonic-gate# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 25*7c478bd9Sstevel@tonic-gate# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26*7c478bd9Sstevel@tonic-gate# 27*7c478bd9Sstevel@tonic-gate# @(#) $Header: Makefile.in,v 1.24 97/04/22 13:31:20 leres Exp $ (LBL) 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gatePROG= traceroute 30*7c478bd9Sstevel@tonic-gateTRACEROUTEOBJS= traceroute.o traceroute_aux.o traceroute_aux6.o 31*7c478bd9Sstevel@tonic-gateCOMMONOBJS= ifaddrlist.o 32*7c478bd9Sstevel@tonic-gateOBJS= $(TRACEROUTEOBJS) $(COMMONOBJS) 33*7c478bd9Sstevel@tonic-gateSUIDPROG= traceroute 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 36*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd-inet 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gateTRACEROUTESRCS= $(TRACEROUTEOBJS:.o=.c) 39*7c478bd9Sstevel@tonic-gateCOMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:.o=.c) 40*7c478bd9Sstevel@tonic-gateSRCS= $(TRACEROUTESRCS) $(COMMONSRCS) 41*7c478bd9Sstevel@tonic-gateHDRS= traceroute.h $(CMDINETCOMMONDIR)/ifaddrlist.h 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/traceroute := FILEMODE= 04555 44*7c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/traceroute := OWNER= root 45*7c478bd9Sstevel@tonic-gate 46*7c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(CMDINETCOMMONDIR) 47*7c478bd9Sstevel@tonic-gate 48*7c478bd9Sstevel@tonic-gate# Traceroute uses the ancillary data feature which is available only through 49*7c478bd9Sstevel@tonic-gate# UNIX 98 standards version of Socket interface. This interface is supposed to 50*7c478bd9Sstevel@tonic-gate# be accessed by -lxnet. In addition -lsocket and -lnsl are used to 51*7c478bd9Sstevel@tonic-gate# capture new not-yet-standard interfaces. Someday -lxnet alone should be enough 52*7c478bd9Sstevel@tonic-gate# when IPv6 inspired new interfaces are part of standards. 53*7c478bd9Sstevel@tonic-gateLDLIBS += -lxnet -lsocket -lnsl 54*7c478bd9Sstevel@tonic-gate 55*7c478bd9Sstevel@tonic-gate# these #defines are required to use UNIX 98 interfaces 56*7c478bd9Sstevel@tonic-gate_D_UNIX98_EXTN= -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ 57*7c478bd9Sstevel@tonic-gate 58*7c478bd9Sstevel@tonic-gate$(TRACEROUTEOBJS) := CPPFLAGS += $(_D_UNIX98_EXTN) 59*7c478bd9Sstevel@tonic-gate 60*7c478bd9Sstevel@tonic-gateLINTFLAGS += $(_D_UNIX98_EXTN) 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate# 63*7c478bd9Sstevel@tonic-gate# Setting the above defines to use the UNIX98 ancillary data feature 64*7c478bd9Sstevel@tonic-gate# causes lint to output warnings about lint library declarations 65*7c478bd9Sstevel@tonic-gate# conflicting with those in the header files. Since we need these 66*7c478bd9Sstevel@tonic-gate# features, the best course of action is to switch the types of the 67*7c478bd9Sstevel@tonic-gate# resulting warnings off when running lint. 68*7c478bd9Sstevel@tonic-gate# 69*7c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_FUNC_DECL_VAR_ARG2 -erroff=E_INCONS_ARG_DECL2 \ 70*7c478bd9Sstevel@tonic-gate -erroff=E_INCONS_ARG_USED2 -erroff=E_INCONS_VAL_TYPE_DECL2 71*7c478bd9Sstevel@tonic-gate 72*7c478bd9Sstevel@tonic-gate.KEEP_STATE: 73*7c478bd9Sstevel@tonic-gate 74*7c478bd9Sstevel@tonic-gateall: $(PROG) 75*7c478bd9Sstevel@tonic-gate 76*7c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 77*7c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 78*7c478bd9Sstevel@tonic-gate $(POST_PROCESS) 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gate$(COMMONOBJS): $(COMMONSRCS) 81*7c478bd9Sstevel@tonic-gate $(COMPILE.c) $(COMMONSRCS) 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gateinstall: all $(ROOTUSRSBINPROG) 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gateclean: 86*7c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 87*7c478bd9Sstevel@tonic-gate 88*7c478bd9Sstevel@tonic-gatelint: lint_SRCS 89*7c478bd9Sstevel@tonic-gate 90*7c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 91