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