Makefile revision 6e91bba0d6c6bdabbba62cefae583715a4a58e2a
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 2010 Sun Microsystems, Inc. All rights reserved.
3996N/A# Use is subject to license terms.
883N/A#
883N/A#
883N/A
883N/APROG = ipadm
883N/AROOTFS_PROG = $(PROG)
883N/ALOCALOBJS= ipadm.o
883N/ACOMMONOBJS=
883N/AOBJS= $(LOCALOBJS) $(COMMONOBJS)
883N/A
1273N/Ainclude ../../../Makefile.cmd
883N/Ainclude ../../Makefile.cmd-inet
4561N/A
4561N/AXGETFLAGS += -a -x $(PROG).xcl
4561N/ALOCALSRCS= $(LOCALOBJS:%.o=%.c)
4561N/ACOMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:%.o=%.c)
4561N/ASRCS= $(LOCALSRCS) $(COMMONSRCS)
4561N/A
4561N/ACPPFLAGS += -I$(CMDINETCOMMONDIR)
883N/ALDLIBS += -linetutil -lipadm -lnvpair
883N/ALINTFLAGS += -m
883N/A
883N/AROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
883N/A
883N/A# ipadm uses the ancillary data feature which is available only through
883N/A# UNIX 98 standards version of Socket interface. This interface is supposed to
1653N/A# be accessed by -lxnet. In addition -lsocket is used to capture new
883N/A# not-yet-standard interfaces. Someday -lxnet alone should be enough when IPv6
956N/A# inspired new interfaces are part of standards.
883N/ALDLIBS += -lxnet -lsocket
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)
1574N/A
1574N/A$(ROOTCFGDIR)/ipadm.conf := FILEMODE= 644
1574N/A
883N/A#
883N/A# Instrument ipadm with CTF data to ease debugging.
883N/A#
883N/ACTFCONVERT_HOOK = && $(CTFCONVERT_O)
883N/ACTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS)
883N/A$(OBJS) := CFLAGS += $(CTF_FLAGS)
883N/A
883N/A.KEEP_STATE:
883N/A
883N/Aall: $(ROOTFS_PROG)
887N/A
887N/A$(PROG): $(OBJS)
887N/A $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK)
913N/A $(POST_PROCESS)
913N/A
913N/Ainstall: all $(ROOTSBINPROG) $(ROOTCFGDIR) $(ROOTCFGFILES) $(ROOTUSRSBINLINKS)
913N/A
883N/A$(ROOTUSRSBINLINKS):
3996N/A -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
clean:
$(RM) $(OBJS)
lint: lint_SRCS
$(ROOTCFGDIR):
$(INS.dir)
$(ROOTCFGDIR)/%: $(ROOTCFGDIR) %
$(INS.file)
include ../../../Makefile.targ