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 50ba2cbe9Sxc# Common Development and Distribution License (the "License"). 60ba2cbe9Sxc# 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 274648396cSYuri PankovPROG= dladm 280ba2cbe9SxcROOTFS_PROG= $(PROG) 294648396cSYuri PankovOBJS= dladm.o 304648396cSYuri Pankov 314648396cSYuri PankovCFGFILES= secobj.conf 320ba2cbe9SxcROOTCFGDIR= $(ROOTETC)/dladm 330ba2cbe9SxcROOTCFGFILES= $(CFGFILES:%=$(ROOTCFGDIR)/%) 347c478bd9Sstevel@tonic-gate 354648396cSYuri Pankovinclude $(SRC)/cmd/Makefile.cmd 364648396cSYuri Pankovinclude $(SRC)/cmd/Makefile.ctf 377c478bd9Sstevel@tonic-gate 384648396cSYuri PankovXGETFLAGS += -a -x $(PROG).xcl 394eaa4710SRishi Srivatsavai 404648396cSYuri PankovLDLIBS += -L$(ROOT)/lib -lsocket 41e96f8419SYuri PankovLDLIBS += -ldladm -ldlpi -lkstat -lsecdb -lbsm -lofmt -linetutil -ldevinfo 42*36589d6bSRobert MustacchiLDLIBS += $(ZLAZYLOAD) -lrstp $(ZNOLAZYLOAD) -lnsl -lumem -lcustr 434648396cSYuri Pankov 444648396cSYuri PankovCERRWARN += -_gcc=-Wno-switch 454648396cSYuri PankovCERRWARN += -_gcc=-Wno-unused-label 467014882cSRichard Lowe 475661bb76SJohn LevonSMOFF += snprintf_overflow 485661bb76SJohn Levon 496ba597c5SAnurag S. Maskey$(ROOTCFGDIR)/secobj.conf := FILEMODE= 660 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate.KEEP_STATE: 527c478bd9Sstevel@tonic-gate 534648396cSYuri Pankovall: $(PROG) 547c478bd9Sstevel@tonic-gate 554648396cSYuri Pankov$(PROG): $(OBJS) 564648396cSYuri Pankov $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 574648396cSYuri Pankov $(POST_PROCESS) 580ba2cbe9Sxc 590ba2cbe9Sxcclean: 604648396cSYuri Pankov $(RM) $(OBJS) 614648396cSYuri Pankov 624648396cSYuri Pankovinstall: all $(ROOTSBINPROG) $(ROOTCFGDIR) $(ROOTCFGFILES) 634648396cSYuri Pankov $(RM) $(ROOTUSRSBINPROG) 644648396cSYuri Pankov -$(SYMLINK) ../../sbin/$(PROG) $(ROOTUSRSBINPROG) 650ba2cbe9Sxc 660ba2cbe9Sxc$(ROOTCFGDIR): 674648396cSYuri Pankov $(INS.dir) 680ba2cbe9Sxc 690ba2cbe9Sxc$(ROOTCFGDIR)/%: $(ROOTCFGDIR) % 704648396cSYuri Pankov $(INS.file) 710ba2cbe9Sxc 724648396cSYuri Pankovinclude $(SRC)/cmd/Makefile.targ 73