Makefile revision d62bc4badc1c1f1549c961cfb8b420e650e1272b
883N/A#
883N/A# CDDL HEADER START
883N/A#
883N/A# The contents of this file are subject to the terms of the
883N/A# Common Development and Distribution License (the "License").
883N/A# You may not use this file except in compliance with the License.
883N/A#
883N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
883N/A# or http://www.opensolaris.org/os/licensing.
883N/A# See the License for the specific language governing permissions
883N/A# and limitations under the License.
883N/A#
883N/A# When distributing Covered Code, include this CDDL HEADER in each
883N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
883N/A# If applicable, add the following below this CDDL HEADER, with the
883N/A# fields enclosed by brackets "[]" replaced with your own identifying
883N/A# information: Portions Copyright [yyyy] [name of copyright owner]
883N/A#
883N/A# CDDL HEADER END
883N/A#
883N/A#
883N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
883N/A# Use is subject to license terms.
883N/A#
883N/A# ident "%Z%%M% %I% %E% SMI"
883N/A#
883N/A
883N/APROG = ifconfig
883N/AROOTFS_PROG = $(PROG)
883N/ALOCALOBJS= ifconfig.o revarp.o
883N/ACOMMONOBJS= compat.o
883N/AOBJS= $(LOCALOBJS) $(COMMONOBJS)
883N/A
883N/Ainclude ../../../Makefile.cmd
883N/Ainclude ../../Makefile.cmd-inet
883N/A
883N/ALOCALSRCS= $(LOCALOBJS:%.o=%.c)
883N/ACOMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:%.o=%.c)
883N/ASRCS= $(LOCALSRCS) $(COMMONSRCS)
883N/A
883N/ACPPFLAGS += -I$(CMDINETCOMMONDIR) -I$(SRC)/common/net/dhcp
883N/ALDLIBS += -ldhcpagent -linetcfg -ldlpi
883N/ALINTFLAGS += -m
883N/A
883N/AROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
883N/A
883N/A# ifconfig uses the ancillary data feature which is available only through
883N/A# UNIX 98 standards version of Socket interface. This interface is supposed to
883N/A# be accessed by -lxnet. In addition -lsocket and -lnsl are used to
883N/A# capture new not-yet-standard interfaces. Someday -lxnet alone should be
883N/A# enough when IPv6 inspired new interfaces are part of standards.
883N/ALDLIBS += -lxnet -lsocket -lnsl
883N/A
883N/A# these #defines are required to use UNIX 98 interfaces
883N/A_D_UNIX98_EXTN= -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
883N/A
883N/A$(OBJS) := CPPFLAGS += $(_D_UNIX98_EXTN)
883N/A
883N/ALINTFLAGS += $(_D_UNIX98_EXTN)
883N/A
887N/A.KEEP_STATE:
887N/A
887N/Aall: $(ROOTFS_PROG)
913N/A
913N/A$(PROG): $(OBJS)
913N/A $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
913N/A $(POST_PROCESS)
883N/A
883N/Ainstall: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS)
883N/A
883N/A$(ROOTUSRSBINLINKS):
-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
clean:
$(RM) $(OBJS)
lint: lint_SRCS
include ../../../Makefile.targ