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