xref: /titanic_41/usr/src/cmd/ypcmd/yppasswd/Makefile (revision 146832db19eb2048b216b5dd0ba4424c7d0dfd17)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26NETYPPROG =	rpc.yppasswdd # pwconv passmgmt
27DEFAULTFILES =	yppasswdd.dfl
28PROG =		$(NETYPPROG)
29
30MANIFEST = passwd.xml
31
32include ../../Makefile.cmd
33
34ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
35
36#installed directories
37RPCSVC=		$(ROOT)/usr/include/rpcsvc
38NETSVC =	$(ROOTLIB)/netsvc
39NETYP =		$(NETSVC)/yp
40ROOTDIRS =	$(NETSVC) $(NETYP)
41
42# include library definitions
43#LDLIBS +=	-lrpcsvc -lnsl -lcrypt -lintl -lgen
44LDLIBS +=	-lnsl -lnisdb -lc
45MAPFILES =	$(MAPFILE.INT) $(MAPFILE.NGB)
46LDFLAGS +=	$(MAPFILES:%=-M%)
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)   := FILEMODE=555
75
76$(ETCDFLTFILE) := FILEMODE=0444
77
78#install rules
79
80.KEEP_STATE:
81
82all: $(PROG)
83
84rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) $(MAPFILES)
85	$(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \
86	$(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS)
87	$(POST_PROCESS)
88
89install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTETCDEFAULTFILES) \
90	$(ROOTMANIFEST)
91
92$(ROOTDIRS):
93	$(INS.dir)
94
95$(NETYP)/%: %
96	$(INS.file)
97
98clean:
99	$(RM) $(OBJS)
100
101lint:	lint_SRCS
102
103check: $(CHKMANIFEST)
104
105cstyle:
106	${CSTYLE} ${SRCS}
107
108# include library targets
109include ../../Makefile.targ
110