xref: /titanic_44/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 1992-2002 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29PROG	= in.mpathd
30PROGDFL	= mpathd
31OBJS	= mpd_tables.o mpd_main.o mpd_probe.o
32SRCS	= $(OBJS:%.o=%.c)
33
34include ../../../Makefile.cmd
35
36POFILE	= $(PROG).po
37POFILES = $(SRCS:%.c=%.po)
38
39#
40# We need access to the ancillary data features which are only available
41# via UNIX98; enable the appropriate #defines for UNIX98.
42#
43CPPFLAGS += -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -I$(SRC)/cmd/cmd-inet/common
44LDLIBS	+= -lcmd -lsocket -lnsl -lsysevent -lnvpair -lipmp -lc
45
46DFLTD  		= $(ROOTETC)/default
47ETCDFLTPROG	= $(PROGDFL:%=$(DFLTD)/%)
48$(ETCDFLTPROG)	:= FILEMODE = 0444
49$(ETCDFLTPROG)	:= OWNER = root
50$(ETCDFLTPROG)	:= GROUP = sys
51
52LINTFLAGS += -erroff=E_FUNC_DECL_VAR_ARG2 -erroff=E_INCONS_VAL_TYPE_DECL2 \
53	    -erroff=E_FUNC_USED_VAR_ARG2 -erroff=E_INCONS_ARG_DECL2 \
54	    -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_INCONS_ARG_USED2 \
55	    -errtags=yes
56
57.KEEP_STATE:
58
59all:		$(PROG) $(PROGDFL).dfl
60
61$(PROG):	$(OBJS)
62		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
63		$(POST_PROCESS)
64
65include ../Makefile.lib
66
67$(ROOTSBINPROG):
68		$(RM) $@; $(SYMLINK) ../usr/lib/inet/$(PROG) $@
69
70install:	all $(ROOTLIBINETPROG) $(ROOTSBINPROG) $(DFLTD) $(ETCDFLTPROG)
71
72clean:
73		$(RM) $(OBJS)
74
75lint:		lint_SRCS
76
77$(DFLTD):
78		$(INS.dir)
79
80$(DFLTD)/%:	%.dfl
81		$(INS.rename)
82
83$(POFILE): 	$(POFILES)
84		$(RM) $@
85		$(CAT) $(POFILES) > $@
86
87include ../../../Makefile.targ
88