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# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gatePROG = in.mpathd 27e11c3f44SmeemROOTFS_PROG = $(PROG) 287c478bd9Sstevel@tonic-gateOBJS = mpd_tables.o mpd_main.o mpd_probe.o 297c478bd9Sstevel@tonic-gateSRCS = $(OBJS:%.o=%.c) 30a7872406SmeemDEFAULTFILES = mpathd.dfl 31a7872406Smeem 327c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 337c478bd9Sstevel@tonic-gate 34e11c3f44SmeemROOTCMDDIR = $(ROOT)/lib/inet 35e11c3f44Smeem 367c478bd9Sstevel@tonic-gatePOFILE = $(PROG).po 377c478bd9Sstevel@tonic-gatePOFILES = $(SRCS:%.c=%.po) 387c478bd9Sstevel@tonic-gate 39e3e7cd29SmeemC99MODE = $(C99_ENABLE) 40e3e7cd29Smeem 417c478bd9Sstevel@tonic-gate# 427c478bd9Sstevel@tonic-gate# We need access to the ancillary data features which are only available 43e3e7cd29Smeem# via the SUS standards. Further, C99 support requires SUSv3 or higher. 447c478bd9Sstevel@tonic-gate# 45e3e7cd29SmeemCPPFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ 46e11c3f44SmeemLDLIBS += -lsocket -lnsl -lsysevent -lnvpair -lipmp -linetutil -ldlpi 47e11c3f44SmeemLINTFLAGS += -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_ARG_USED2 487c478bd9Sstevel@tonic-gate 49*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 50*7014882cSRichard Lowe 51e11c3f44Smeem# 52e11c3f44Smeem# Instrument in.mpathd with CTF data to ease debugging. 53e11c3f44Smeem# 54e11c3f44SmeemCTFCONVERT_HOOK = && $(CTFCONVERT_O) 55e11c3f44SmeemCTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS) 56e11c3f44Smeem$(OBJS) := CFLAGS += $(CTF_FLAGS) 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gate.KEEP_STATE: 597c478bd9Sstevel@tonic-gate 60a7872406Smeemall: $(PROG) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 63e11c3f44Smeem $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) 647c478bd9Sstevel@tonic-gate $(POST_PROCESS) 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gateinclude ../Makefile.lib 677c478bd9Sstevel@tonic-gate 68e11c3f44Smeem$(ROOTLIBINETPROG): 69e11c3f44Smeem $(RM) $@; $(SYMLINK) ../../../lib/inet/$(PROG) $@ 707c478bd9Sstevel@tonic-gate 71e11c3f44Smeem$(ROOTSBINPROG): 72e11c3f44Smeem $(RM) $@; $(SYMLINK) ../lib/inet/$(PROG) $@ 73e11c3f44Smeem 74e11c3f44Smeeminstall: all $(ROOTLIBINETPROG) $(ROOTSBINPROG) $(ROOTCMD) \ 75e11c3f44Smeem $(ROOTETCDEFAULTFILES) 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gateclean: 787c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gatelint: lint_SRCS 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) 837c478bd9Sstevel@tonic-gate $(RM) $@ 847c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 87