xref: /titanic_41/usr/src/cmd/ypcmd/yppasswd/Makefile (revision 6185db853e024a486ff8837e6784dd290d866112)
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$(ROOTMANIFEST) := FILEMODE = 0444
81
82#install rules
83
84.KEEP_STATE:
85
86all: $(PROG)
87
88rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ)
89	$(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \
90	$(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS)
91	$(POST_PROCESS)
92
93install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTETCDEFAULTFILES) \
94	$(ROOTMANIFEST)
95
96$(ROOTDIRS):
97	$(INS.dir)
98
99$(NETYP)/%: %
100	$(INS.file)
101
102clean:
103	$(RM) $(OBJS)
104
105lint:	lint_SRCS
106
107check: $(CHKMANIFEST)
108
109cstyle:
110	${CSTYLE} ${SRCS}
111
112# include library targets
113include ../../Makefile.targ
114