xref: /illumos-gate/usr/src/cmd/ypcmd/yppasswd/Makefile (revision 03100a6332bd4edc7a53091fcf7c9a7131bcdaa7)
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 2007 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
47MAPFILES =	$(MAPFILE.INT) $(MAPFILE.NGB)
48LDFLAGS +=	$(MAPFILES:%=-M%)
49
50# Pick up includes from library
51CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
52
53# This file is now in the $(SRC)/head/rpcsvc directory.
54#HDRFILE= yppasswd.h
55#IHDRFILE= $(HDRFILE:%=$(RPCSVC)/%)
56
57INETYPPROG=		$(NETYPPROG:%=$(NETYP)/%)
58
59COMMONOBJ =		yppasswdxdr.o yplckpwdf.o
60RPCYPPASSWDDOBJ =	yppasswdd.o changepasswd.o
61#YPPWCONVOBJ = 		pwconv.o
62#YPPASSMGMTOBJ =		passmgmt.o
63
64#
65# Objects shared between all the major components
66#
67SHAREDOBJ= ../shared/utils.o ../shared/lockmap.o ../shared/ancil.o
68
69OBJS = 			$(RPCYPPASSWDDOBJ) \
70			$(COMMONOBJ)
71			# $(YPPWCONVOBJ) $(YPPASSMGMTOBJ)
72
73SRCS =			$(OBJS:%.o=%.c)
74
75#conditional assignments
76$(INETSVC)   := GROUP=bin
77$(INETSVC)   := FILEMODE=555
78
79$(ETCDFLTFILE) := GROUP=sys
80$(ETCDFLTFILE) := FILEMODE=0444
81
82#install rules
83
84.KEEP_STATE:
85
86all: $(PROG)
87
88rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) $(MAPFILES)
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