xref: /titanic_41/usr/src/cmd/dladm/Makefile (revision 26aff01ee118d6a23ab9068c36e1f5e3d0002922)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
50ba2cbe9Sxc151355# Common Development and Distribution License (the "License").
60ba2cbe9Sxc151355# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
21*26aff01eSYuri Pankov
227c478bd9Sstevel@tonic-gate#
236ba597c5SAnurag S. Maskey# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gatePROG=		dladm
287c478bd9Sstevel@tonic-gateROOTFS_PROG=	$(PROG)
29*26aff01eSYuri PankovOBJS=		dladm.o
30*26aff01eSYuri Pankov
31*26aff01eSYuri PankovCFGFILES=	secobj.conf
320ba2cbe9Sxc151355ROOTCFGDIR=	$(ROOTETC)/dladm
330ba2cbe9Sxc151355ROOTCFGFILES=	$(CFGFILES:%=$(ROOTCFGDIR)/%)
347c478bd9Sstevel@tonic-gate
35*26aff01eSYuri Pankovinclude		$(SRC)/cmd/Makefile.cmd
36*26aff01eSYuri Pankovinclude		$(SRC)/cmd/Makefile.ctf
377c478bd9Sstevel@tonic-gate
3833343a97SmeemXGETFLAGS +=	-a -x $(PROG).xcl
39*26aff01eSYuri Pankov
40da14cebeSEric ChengLDLIBS +=	-L$(ROOT)/lib -lsocket
41d62bc4baSyz147064LDLIBS +=	-ldladm -ldlpi -lkstat -lsecdb -lbsm -linetutil -ldevinfo
424eaa4710SRishi SrivatsavaiLDLIBS +=	$(ZLAZYLOAD) -lrstp $(ZNOLAZYLOAD)
434eaa4710SRishi Srivatsavai
447014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
457014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-label
467014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
477014882cSRichard Lowe
484eaa4710SRishi Srivatsavai# For headers from librstp.
494eaa4710SRishi SrivatsavaiLINTFLAGS +=	-erroff=E_TRAILING_COMMA_IN_ENUM
504eaa4710SRishi Srivatsavailint :=		ZLAZYLOAD=
514eaa4710SRishi Srivatsavailint :=		ZNOLAZYLOAD=
524eaa4710SRishi Srivatsavai
53*26aff01eSYuri Pankov$(ROOTCFGDIR)/secobj.conf := FILEMODE= 660
54*26aff01eSYuri Pankov
557c478bd9Sstevel@tonic-gate.KEEP_STATE:
567c478bd9Sstevel@tonic-gate
57*26aff01eSYuri Pankovall:		$(PROG)
58*26aff01eSYuri Pankov
59*26aff01eSYuri Pankov$(PROG):	$(OBJS)
60*26aff01eSYuri Pankov		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
61*26aff01eSYuri Pankov		$(POST_PROCESS)
62*26aff01eSYuri Pankov
63*26aff01eSYuri Pankovclean:
64*26aff01eSYuri Pankov		$(RM) $(OBJS)
657c478bd9Sstevel@tonic-gate
660ba2cbe9Sxc151355install:	all $(ROOTSBINPROG) $(ROOTCFGDIR) $(ROOTCFGFILES)
670ba2cbe9Sxc151355		$(RM) $(ROOTUSRSBINPROG)
680ba2cbe9Sxc151355		-$(SYMLINK) ../../sbin/$(PROG) $(ROOTUSRSBINPROG)
690ba2cbe9Sxc151355
700ba2cbe9Sxc151355lint:		lint_PROG
710ba2cbe9Sxc151355
720ba2cbe9Sxc151355$(ROOTCFGDIR):
730ba2cbe9Sxc151355		$(INS.dir)
740ba2cbe9Sxc151355
750ba2cbe9Sxc151355$(ROOTCFGDIR)/%: $(ROOTCFGDIR) %
760ba2cbe9Sxc151355		$(INS.file)
770ba2cbe9Sxc151355
78*26aff01eSYuri Pankovinclude		$(SRC)/cmd/Makefile.targ
79