10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 52923Sraf# Common Development and Distribution License (the "License"). 62923Sraf# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*8485SPeter.Memishian@Sun.COM# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate 26*8485SPeter.Memishian@Sun.COMPROG = in.mpathd 27*8485SPeter.Memishian@Sun.COMROOTFS_PROG = $(PROG) 28*8485SPeter.Memishian@Sun.COMOBJS = mpd_tables.o mpd_main.o mpd_probe.o 29*8485SPeter.Memishian@Sun.COMSRCS = $(OBJS:%.o=%.c) 30*8485SPeter.Memishian@Sun.COMDEFAULTFILES = mpathd.dfl 3189Smeem 320Sstevel@tonic-gateinclude ../../../Makefile.cmd 330Sstevel@tonic-gate 34*8485SPeter.Memishian@Sun.COMROOTCMDDIR = $(ROOT)/lib/inet 350Sstevel@tonic-gate 36*8485SPeter.Memishian@Sun.COMPOFILE = $(PROG).po 37*8485SPeter.Memishian@Sun.COMPOFILES = $(SRCS:%.c=%.po) 38*8485SPeter.Memishian@Sun.COM 39*8485SPeter.Memishian@Sun.COMC99MODE = $(C99_ENABLE) 406578Smeem 410Sstevel@tonic-gate# 420Sstevel@tonic-gate# We need access to the ancillary data features which are only available 436578Smeem# via the SUS standards. Further, C99 support requires SUSv3 or higher. 440Sstevel@tonic-gate# 456578SmeemCPPFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ 46*8485SPeter.Memishian@Sun.COMLDLIBS += -lsocket -lnsl -lsysevent -lnvpair -lipmp -linetutil -ldlpi 47*8485SPeter.Memishian@Sun.COMLINTFLAGS += -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_ARG_USED2 480Sstevel@tonic-gate 49*8485SPeter.Memishian@Sun.COM# 50*8485SPeter.Memishian@Sun.COM# Instrument in.mpathd with CTF data to ease debugging. 51*8485SPeter.Memishian@Sun.COM# 52*8485SPeter.Memishian@Sun.COMCTFCONVERT_HOOK = && $(CTFCONVERT_O) 53*8485SPeter.Memishian@Sun.COMCTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS) 54*8485SPeter.Memishian@Sun.COM$(OBJS) := CFLAGS += $(CTF_FLAGS) 550Sstevel@tonic-gate 560Sstevel@tonic-gate.KEEP_STATE: 570Sstevel@tonic-gate 5889Smeemall: $(PROG) 590Sstevel@tonic-gate 600Sstevel@tonic-gate$(PROG): $(OBJS) 61*8485SPeter.Memishian@Sun.COM $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) 620Sstevel@tonic-gate $(POST_PROCESS) 630Sstevel@tonic-gate 640Sstevel@tonic-gateinclude ../Makefile.lib 650Sstevel@tonic-gate 66*8485SPeter.Memishian@Sun.COM$(ROOTLIBINETPROG): 67*8485SPeter.Memishian@Sun.COM $(RM) $@; $(SYMLINK) ../../../lib/inet/$(PROG) $@ 68*8485SPeter.Memishian@Sun.COM 690Sstevel@tonic-gate$(ROOTSBINPROG): 70*8485SPeter.Memishian@Sun.COM $(RM) $@; $(SYMLINK) ../lib/inet/$(PROG) $@ 710Sstevel@tonic-gate 72*8485SPeter.Memishian@Sun.COMinstall: all $(ROOTLIBINETPROG) $(ROOTSBINPROG) $(ROOTCMD) \ 73*8485SPeter.Memishian@Sun.COM $(ROOTETCDEFAULTFILES) 740Sstevel@tonic-gate 750Sstevel@tonic-gateclean: 760Sstevel@tonic-gate $(RM) $(OBJS) 770Sstevel@tonic-gate 780Sstevel@tonic-gatelint: lint_SRCS 790Sstevel@tonic-gate 800Sstevel@tonic-gate$(POFILE): $(POFILES) 810Sstevel@tonic-gate $(RM) $@ 820Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 830Sstevel@tonic-gate 840Sstevel@tonic-gateinclude ../../../Makefile.targ 85