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 506e1a714Sraf# Common Development and Distribution License (the "License"). 606e1a714Sraf# 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# 217c478bd9Sstevel@tonic-gate# 22e11c3f44Smeem# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 25*a73be61aSHans Rosenfeld# Copyright 2021 Tintri by DDN, Inc. All rights reserved. 26*a73be61aSHans Rosenfeld# 277c478bd9Sstevel@tonic-gate 28e11c3f44SmeemPROG = in.mpathd 29e11c3f44SmeemROOTFS_PROG = $(PROG) 30e11c3f44SmeemOBJS = mpd_tables.o mpd_main.o mpd_probe.o 31e11c3f44SmeemSRCS = $(OBJS:%.o=%.c) 32e11c3f44SmeemDEFAULTFILES = mpathd.dfl 33*a73be61aSHans RosenfeldSVCMETHOD = net-ipmp 34*a73be61aSHans RosenfeldMANIFEST = network-ipmp.xml 35a7872406Smeem 367c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 377c478bd9Sstevel@tonic-gate 38e11c3f44SmeemROOTCMDDIR = $(ROOT)/lib/inet 39*a73be61aSHans RosenfeldROOTMANIFESTDIR = $(ROOTSVCNETWORK) 40e11c3f44Smeem 41e11c3f44SmeemPOFILE = $(PROG).po 42e11c3f44SmeemPOFILES = $(SRCS:%.c=%.po) 437c478bd9Sstevel@tonic-gate 44bd0ce624SYuri PankovCSTD = $(CSTD_GNU99) 45e3e7cd29Smeem 467c478bd9Sstevel@tonic-gate# 477c478bd9Sstevel@tonic-gate# We need access to the ancillary data features which are only available 48e3e7cd29Smeem# via the SUS standards. Further, C99 support requires SUSv3 or higher. 497c478bd9Sstevel@tonic-gate# 50e3e7cd29SmeemCPPFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ 51e11c3f44SmeemLDLIBS += -lsocket -lnsl -lsysevent -lnvpair -lipmp -linetutil -ldlpi 52e11c3f44SmeemLINTFLAGS += -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_ARG_USED2 537c478bd9Sstevel@tonic-gate 54d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 557014882cSRichard Lowe 56e11c3f44Smeem# 57e11c3f44Smeem# Instrument in.mpathd with CTF data to ease debugging. 58e11c3f44Smeem# 59e11c3f44SmeemCTFCONVERT_HOOK = && $(CTFCONVERT_O) 60e11c3f44SmeemCTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS) 61e11c3f44Smeem$(OBJS) := CFLAGS += $(CTF_FLAGS) 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate.KEEP_STATE: 647c478bd9Sstevel@tonic-gate 65a7872406Smeemall: $(PROG) 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 68e11c3f44Smeem $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) 697c478bd9Sstevel@tonic-gate $(POST_PROCESS) 707c478bd9Sstevel@tonic-gate 71*a73be61aSHans Rosenfeldcheck: $(CHKMANIFEST) 727c478bd9Sstevel@tonic-gate 73*a73be61aSHans Rosenfeldinstall: all $(ROOTCMD) $(ROOTMANIFEST) $(ROOTSVCMETHOD) \ 74e11c3f44Smeem $(ROOTETCDEFAULTFILES) 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gateclean: 777c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gatelint: lint_SRCS 807c478bd9Sstevel@tonic-gate 81*a73be61aSHans Rosenfeld$(POFILE): $(POFILES) 827c478bd9Sstevel@tonic-gate $(RM) $@ 837c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 86