Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
2058N/A#
2058N/A# CDDL HEADER START
2058N/A#
2058N/A# The contents of this file are subject to the terms of the
2058N/A# Common Development and Distribution License, Version 1.0 only
2058N/A# (the "License"). You may not use this file except in compliance
2058N/A# with the License.
2058N/A#
2058N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2058N/A# or http://www.opensolaris.org/os/licensing.
2058N/A# See the License for the specific language governing permissions
2058N/A# and limitations under the License.
2058N/A#
2058N/A# When distributing Covered Code, include this CDDL HEADER in each
2058N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2058N/A# If applicable, add the following below this CDDL HEADER, with the
2058N/A# fields enclosed by brackets "[]" replaced with your own identifying
2058N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2058N/A#
2058N/A# CDDL HEADER END
3996N/A#
2058N/A#
2058N/A# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
2058N/A# Use is subject to license terms.
2058N/A#
2058N/A# ident "%Z%%M% %I% %E% SMI"
2058N/A#
2058N/A
2058N/APROG= ping
2058N/APINGOBJS= ping.o ping_aux.o ping_aux6.o
2058N/ACOMMONOBJS= ifaddrlist.o
2058N/AOBJS= $(PINGOBJS) $(COMMONOBJS)
2058N/ASUIDPROG= ping
2058N/A
3661N/Ainclude ../../../Makefile.cmd
3661N/Ainclude ../../Makefile.cmd-inet
3996N/A
3996N/APINGSRCS= $(PINGOBJS:.o=.c)
3996N/ACOMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:.o=.c)
2058N/ASRCS= $(PINGSRCS) $(COMMONSRCS)
2058N/AHDRS= ping.h $(CMDINETCOMMONDIR)/ifaddrlist.h
2058N/A
2058N/A$(ROOTUSRSBIN)/ping := FILEMODE= 04555
2058N/A$(ROOTUSRSBIN)/ping := OWNER= root
2058N/A
2058N/A
2058N/ACPPFLAGS += -I$(CMDINETCOMMONDIR)
2058N/A
2058N/A# Ping uses the ancillary data feature which is available only through
2058N/A# UNIX 98 standards version of Socket interface. This interface is supposed to
2058N/A# be accessed by -lxnet. In addition -lsocket and -lnsl are used to
2058N/A# capture new not-yet-standard interfaces. Someday -lxnet alone should be enough
2058N/A# when IPv6 inspired new interfaces are part of standards.
LDLIBS += -lxnet -lsocket -lnsl -lm
# these #defines are required to use UNIX 98 interfaces
_D_UNIX98_EXTN = -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
$(PINGOBJS) := CPPFLAGS += $(_D_UNIX98_EXTN)
LINTFLAGS += $(_D_UNIX98_EXTN)
# Setting the above defines to use the UNIX98 ancillary data feature
# causes lint to output warnings about lint library declarations conflicting
# with those in the header files. Since we need these features the best
# course of action is to switch the types of the resulting warnings off
# when running lint.
LINTFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2 -erroff=E_INCONS_ARG_DECL2 \
-erroff=E_FUNC_DECL_VAR_ARG2
.KEEP_STATE:
.PARALLEL:
all: $(PROG)
$(PROG): $(OBJS)
$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
$(POST_PROCESS)
$(COMMONOBJS): $(COMMONSRCS)
$(COMPILE.c) $(COMMONSRCS)
install: all $(ROOTUSRSBINPROG)
clean:
$(RM) $(OBJS)
lint: lint_SRCS
include ../../../Makefile.targ