xref: /illumos-gate/usr/src/cmd/dladm/Makefile (revision 36589d6bb0cdae89e166b57b0d64ae56d53247d9)
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#
216ba597c5SAnurag S. Maskey# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
227c478bd9Sstevel@tonic-gate# Use is subject to license terms.
23*36589d6bSRobert Mustacchi# Copyright 2015 Joyent, Inc.
247c478bd9Sstevel@tonic-gate#
255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gatePROG=		dladm
287c478bd9Sstevel@tonic-gateROOTFS_PROG=	$(PROG)
294648396cSYuri PankovOBJS=		dladm.o
304648396cSYuri Pankov
314648396cSYuri PankovCFGFILES=	secobj.conf
320ba2cbe9Sxc151355ROOTCFGDIR=	$(ROOTETC)/dladm
330ba2cbe9Sxc151355ROOTCFGFILES=	$(CFGFILES:%=$(ROOTCFGDIR)/%)
347c478bd9Sstevel@tonic-gate
354648396cSYuri Pankovinclude		$(SRC)/cmd/Makefile.cmd
364648396cSYuri Pankovinclude		$(SRC)/cmd/Makefile.ctf
377c478bd9Sstevel@tonic-gate
3833343a97SmeemXGETFLAGS +=	-a -x $(PROG).xcl
394648396cSYuri Pankov
40da14cebeSEric ChengLDLIBS +=	-L$(ROOT)/lib -lsocket
41e96f8419SYuri PankovLDLIBS +=	-ldladm -ldlpi -lkstat -lsecdb -lbsm -lofmt -linetutil -ldevinfo
42*36589d6bSRobert MustacchiLDLIBS +=	$(ZLAZYLOAD) -lrstp $(ZNOLAZYLOAD) -lnsl -lumem -lcustr
434eaa4710SRishi Srivatsavai
447014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
457014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-label
467014882cSRichard Lowe
475661bb76SJohn LevonSMOFF += snprintf_overflow
485661bb76SJohn Levon
494648396cSYuri Pankov$(ROOTCFGDIR)/secobj.conf := FILEMODE= 660
504648396cSYuri Pankov
517c478bd9Sstevel@tonic-gate.KEEP_STATE:
527c478bd9Sstevel@tonic-gate
534648396cSYuri Pankovall:		$(PROG)
544648396cSYuri Pankov
554648396cSYuri Pankov$(PROG):	$(OBJS)
564648396cSYuri Pankov		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
574648396cSYuri Pankov		$(POST_PROCESS)
584648396cSYuri Pankov
594648396cSYuri Pankovclean:
604648396cSYuri Pankov		$(RM) $(OBJS)
617c478bd9Sstevel@tonic-gate
620ba2cbe9Sxc151355install:	all $(ROOTSBINPROG) $(ROOTCFGDIR) $(ROOTCFGFILES)
630ba2cbe9Sxc151355		$(RM) $(ROOTUSRSBINPROG)
640ba2cbe9Sxc151355		-$(SYMLINK) ../../sbin/$(PROG) $(ROOTUSRSBINPROG)
650ba2cbe9Sxc151355
660ba2cbe9Sxc151355$(ROOTCFGDIR):
670ba2cbe9Sxc151355		$(INS.dir)
680ba2cbe9Sxc151355
690ba2cbe9Sxc151355$(ROOTCFGDIR)/%: $(ROOTCFGDIR) %
700ba2cbe9Sxc151355		$(INS.file)
710ba2cbe9Sxc151355
724648396cSYuri Pankovinclude		$(SRC)/cmd/Makefile.targ
73