xref: /titanic_50/usr/src/cmd/ypcmd/yppasswd/Makefile (revision 080575042aba2197b425ebfd52061dea061a9aa1)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28NETYPPROG =	rpc.yppasswdd # pwconv passmgmt
29DEFAULTFILES =	yppasswdd.dfl
30PROG =		$(NETYPPROG)
31
32MANIFEST = passwd.xml
33
34include ../../Makefile.cmd
35
36ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
37
38#installed directories
39RPCSVC=		$(ROOT)/usr/include/rpcsvc
40NETSVC =	$(ROOTLIB)/netsvc
41NETYP =		$(NETSVC)/yp
42ROOTDIRS =	$(NETSVC) $(NETYP)
43
44# include library definitions
45#LDLIBS +=	-lrpcsvc -lnsl -lcrypt -lintl -lgen
46LDLIBS +=	-lnsl -lnisdb -lc
47
48# Pick up includes from library
49CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
50
51# This file is now in the $(SRC)/head/rpcsvc directory.
52#HDRFILE= yppasswd.h
53#IHDRFILE= $(HDRFILE:%=$(RPCSVC)/%)
54
55INETYPPROG=		$(NETYPPROG:%=$(NETYP)/%)
56
57COMMONOBJ =		yppasswdxdr.o yplckpwdf.o
58RPCYPPASSWDDOBJ =	yppasswdd.o changepasswd.o
59#YPPWCONVOBJ = 		pwconv.o
60#YPPASSMGMTOBJ =		passmgmt.o
61
62#
63# Objects shared between all the major components
64#
65SHAREDOBJ= ../shared/utils.o ../shared/lockmap.o ../shared/ancil.o
66
67OBJS = 			$(RPCYPPASSWDDOBJ) \
68			$(COMMONOBJ)
69			# $(YPPWCONVOBJ) $(YPPASSMGMTOBJ)
70
71SRCS =			$(OBJS:%.o=%.c)
72
73#conditional assignments
74$(INETSVC)   := GROUP=bin
75$(INETSVC)   := FILEMODE=555
76
77$(ETCDFLTFILE) := GROUP=sys
78$(ETCDFLTFILE) := FILEMODE=0444
79
80#install rules
81
82.KEEP_STATE:
83
84all: $(PROG)
85
86rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ)
87	$(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \
88	$(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS)
89	$(POST_PROCESS)
90
91install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTETCDEFAULTFILES) \
92	$(ROOTMANIFEST)
93
94$(ROOTDIRS):
95	$(INS.dir)
96
97$(NETYP)/%: %
98	$(INS.file)
99
100clean:
101	$(RM) $(OBJS)
102
103lint:	lint_SRCS
104
105check: $(CHKMANIFEST)
106
107cstyle:
108	${CSTYLE} ${SRCS}
109
110# include library targets
111include ../../Makefile.targ
112