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
25 NETYPPROG = rpc.yppasswdd
26 DEFAULTFILES = yppasswdd.dfl
27 PROG = $(NETYPPROG)
28
29 MANIFEST = passwd.xml
30
31 include ../../Makefile.cmd
32
33 ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
34
35 #installed directories
36 RPCSVC= $(ROOT)/usr/include/rpcsvc
37 NETSVC = $(ROOTLIB)/netsvc
38 NETYP = $(NETSVC)/yp
39 ROOTDIRS = $(NETSVC) $(NETYP)
40
41 # include library definitions
42 #LDLIBS += -lrpcsvc -lnsl -lcrypt -lintl -lgen
43 LDLIBS += -lnsl -lnisdb -lc
44 MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
45 LDFLAGS += $(MAPFILES:%=-M%)
46
47 # This links with libnisdb, and thus is 'C++', but is otherwise entirely C. A
48 # result of this is that it probably doesn't _actually_ use the C++ runtime, but
49 # may in future (depending on compiler implementation)
50 #
51 # Give up.
52 ZGUIDANCE= -zguidance=nounused
53
54 $(__SUNC)ADJUNCT_LIBS = libC.so
55
56 # Pick up includes from library
57 CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
58
59 # This file is now in the $(SRC)/head/rpcsvc directory.
60 #HDRFILE= yppasswd.h
61 #IHDRFILE= $(HDRFILE:%=$(RPCSVC)/%)
62
63 INETYPPROG= $(NETYPPROG:%=$(NETYP)/%)
64
65 COMMONOBJ = yppasswdxdr.o yplckpwdf.o
66 RPCYPPASSWDDOBJ = yppasswdd.o changepasswd.o
67
68 CERRWARN += -_gcc=-Wno-implicit-function-declaration
69 CERRWARN += -_gcc=-Wno-parentheses
70 CERRWARN += -_gcc=-Wno-uninitialized
71
72 #
73 # Objects shared between all the major components
74 #
75 SHAREDOBJ= ../shared/utils.o ../shared/lockmap.o ../shared/ancil.o
76
77 OBJS = $(RPCYPPASSWDDOBJ) \
78 $(COMMONOBJ)
79 # $(YPPWCONVOBJ) $(YPPASSMGMTOBJ)
80
81 SRCS = $(OBJS:%.o=%.c)
82
83 #conditional assignments
84 $(INETSVC) := FILEMODE=555
85
86 $(ETCDFLTFILE) := FILEMODE=0444
87
88 #install rules
89
90 .KEEP_STATE:
91
92 all: $(PROG)
93
94 rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) $(MAPFILES)
95 $(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \
96 $(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS)
97 $(POST_PROCESS)
98
99 install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTETCDEFAULTFILES) \
100 $(ROOTMANIFEST)
101
102 $(ROOTDIRS):
103 $(INS.dir)
104
105 $(NETYP)/%: %
106 $(INS.file)
107
108 clean:
109 $(RM) $(OBJS)
110
111 lint: lint_SRCS
112
113 check: $(CHKMANIFEST)
114
115 cstyle:
116 ${CSTYLE} ${SRCS}
117
118 # include library targets
119 include ../../Makefile.targ