xref: /titanic_41/usr/src/cmd/ypcmd/yppasswd/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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
59CERRWARN +=		-_gcc=-Wno-implicit-function-declaration
60CERRWARN +=		-_gcc=-Wno-parentheses
61CERRWARN +=		-_gcc=-Wno-uninitialized
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)   := FILEMODE=555
76
77$(ETCDFLTFILE) := FILEMODE=0444
78
79#install rules
80
81.KEEP_STATE:
82
83all: $(PROG)
84
85rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) $(MAPFILES)
86	$(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \
87	$(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS)
88	$(POST_PROCESS)
89
90install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTETCDEFAULTFILES) \
91	$(ROOTMANIFEST)
92
93$(ROOTDIRS):
94	$(INS.dir)
95
96$(NETYP)/%: %
97	$(INS.file)
98
99clean:
100	$(RM) $(OBJS)
101
102lint:	lint_SRCS
103
104check: $(CHKMANIFEST)
105
106cstyle:
107	${CSTYLE} ${SRCS}
108
109# include library targets
110include ../../Makefile.targ
111