xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile (revision d29f5a711240f866521445b1656d114da090335e)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28PROG	= in.mpathd
29OBJS	= mpd_tables.o mpd_main.o mpd_probe.o
30SRCS	= $(OBJS:%.o=%.c)
31
32DEFAULTFILES = mpathd.dfl
33
34include ../../../Makefile.cmd
35
36POFILE	= $(PROG).po
37POFILES = $(SRCS:%.c=%.po)
38
39C99MODE= $(C99_ENABLE)
40
41#
42# We need access to the ancillary data features which are only available
43# via the SUS standards.  Further, C99 support requires SUSv3 or higher.
44#
45CPPFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
46LDLIBS	+= -lsocket -lnsl -lsysevent -lnvpair -lipmp -lc
47
48LINTFLAGS += -erroff=E_FUNC_DECL_VAR_ARG2 -erroff=E_INCONS_VAL_TYPE_DECL2 \
49	    -erroff=E_FUNC_USED_VAR_ARG2 -erroff=E_INCONS_ARG_DECL2 \
50	    -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_INCONS_ARG_USED2 \
51	    -errtags=yes
52
53.KEEP_STATE:
54
55all:		$(PROG)
56
57$(PROG):	$(OBJS)
58		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
59		$(POST_PROCESS)
60
61include ../Makefile.lib
62
63$(ROOTSBINPROG):
64		$(RM) $@; $(SYMLINK) ../usr/lib/inet/$(PROG) $@
65
66install:	all $(ROOTLIBINETPROG) $(ROOTSBINPROG) $(ROOTETCDEFAULTFILES)
67
68clean:
69		$(RM) $(OBJS)
70
71lint:		lint_SRCS
72
73$(POFILE): 	$(POFILES)
74		$(RM) $@
75		$(CAT) $(POFILES) > $@
76
77include ../../../Makefile.targ
78