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 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25
26 BINPROG = ypmatch ypwhich ypcat
27 SBINPROG = makedbm ypalias ypinit yppoll ypset
28 NETYPPROG = ypbind ypxfr yppush udpublickey mkalias \
29 multi multi.awk stdethers stdhosts \
30 ypxfr_1perday ypxfr_1perhour ypxfr_2perday \
31 ypstart ypstop
32 NIS2LDAPPROG = ypxfrd ypserv ypxfr
33 SVCMETHOD = yp
34 PROG= $(BINPROG) $(SBINPROG) $(NETYPPROG) $(NIS2LDAPPROG) $(SVCMETHOD)
35
36 MANIFEST = server.xml client.xml xfr.xml
37
38 include ../Makefile.cmd
39
40 ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
41
42 # installed directories
43 NETSVC = $(ROOTLIB)/netsvc
44 NETYP = $(NETSVC)/yp
45
46 ROOTVAR_YP = $(ROOT)/var/yp
47 ROOTBINDING = $(ROOTVAR_YP)/binding
48 ROOTDIRS = $(ROOT) $(ROOTUSR) $(ROOTLIB) $(ROOTETC) $(ROOTVAR) \
49 $(NETSVC) $(NETYP) $(ROOTVAR_YP) $(ROOTBINDING) \
50 $(ROOTUSRSBIN) $(ROOTBIN)
51
52 $(BINPROG) := LDLIBS += -lnsl
53 $(NETYPPROG) := LDLIBS += -lnsl
54 $(NIS2LDAPPROG) := LDLIBS += -lc -lnsl -lnisdb
55 ypinit := LDLIBS += -lnsl
56 yppoll := LDLIBS += -lnsl
57 ypset := LDLIBS += -lnsl
58 makedbm := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
59 makedbm := LDFLAGS += $(MAPFILES:%=-M%)
60
61 $(ROOTVAR_YP)/aliases := FILEMODE=555
62
63 YPFILES = Makefile aliases nicknames updaters
64 ETCFILES = publickey
65 ROOTYPFILES= $(YPFILES:%=$(ROOTVAR_YP)/%)
66 ROOTETCFILE= $(ETCFILES:%=$(ROOTETC)/%)
67
68 TXTS= $(ETCFILES:%=net_files/%) $(YPFILES:%=net_files/%)
69 SUBDIRS = yppasswd mknetid revnetgroup ypupdated yp2lscripts
70
71 YPBINDOBJ= yp_b_svc.o yp_b_subr.o rpc_bootstrap.o getlist.o
72 #
73 # Some sort of obsolete idea of common files which are only now used by a
74 # few minor utilities
75 #
76 COMMONOBJ= getlist.o yp_getalias.o
77
78 #
79 # Objects shared between all the major components
80 #
81 SHARED_DIR= ./shared
82 SHAREDOBJ= $(SHARED_DIR)/utils.o $(SHARED_DIR)/lockmap.o $(SHARED_DIR)/ancil.o
83 SHARESRC = $(SHAREOBJ:.o=.c)
84
85 YPXFROBJ = ypxfr.o ypxfrd_client.o ypxfrd_xdr.o
86 YPMATOBJ = ypmatch.o nick.o
87 YPWHIOBJ = ypwhich.o nick.o
88 YPCATOBJ = ypcat.o nick.o
89 UDPUBLICKEYOBJ = udpublickey.o
90 MKALIASOBJ = mkalias.o
91 STDETHERSOBJ = stdethers.o
92 STDHOSTSOBJ = stdhosts.o
93 #COMMONCLNTOBJ = clnt_create_rsvd.o
94 YPSERVOBJ = ypserv.o ypserv_map.o \
95 ypserv_proc.o ypserv_ancil.o \
96 ypserv_resolv.o ypserv_resolv_common.o \
97 ypv1_xdr.o ypserv_net_secure.o
98 YPPUSHOBJ = yppush.o
99 YPXFRDOBJ = ypxfrd_svc.o ypxfrd_xdr.o ypxfrd_server.o \
100 ypserv_net_secure.o
101
102 NETYPOBJ = $(YPXFROBJ) $(YPXFRDOBJ) $(YPSERVOBJ) $(YPPUSHOBJ) \
103 $(YPBINDOBJ) $(UDPUBLICKEYOBJ)
104 OBJS = $(NETYPOBJ) $(MKALIASOBJ) $(COMMONOBJ) $(SHAREDOBJ) \
105 $(YPPUSHOBJ) $(YPMATOBJ) $(YPWHIOBJ) $(YPCATOBJ) \
106 $(STDETHERSOBJ) $(STDHOSTSOBJ) makedbm.o ypalias.o pong.o
107
108 BINSRC = $(BINPROG:=.c)
109
110 SBINSRC = $(SBINPROG:=.c)
111
112 NETYPSRC = $(NETYPOBJ:.o=.c)
113
114 YPBINDSRC = $(YPBINSOBJ:.o=.c)
115
116 YPXFRSRC = $(YPXFROBJ:.o=.c)
117
118 YPSERVSRC = $(YPSERVOBJ:.o=.c)
119
120 YPPUSHSRC = $(YPPUSHOBJ:.o=.c)
121
122 YPXFRDSRC = $(YPXFRDOBJ:.o=.c)
123
124 YPMASTERSRC = $(YPMASTEROBJ:.o=.c)
125
126 YPALLSRC = $(YPALLOBJ:.o=.c)
127
128 COMMONSRC = $(COMMONOBJ:.o=.c)
129
130 #COMMONCLNTSRC = $(COMMONCLNTOBJ:.o=.c)
131
132 SRCS = $(BINSRC) $(SBINSRC) $(NETYPSRC) \
133 $(COMMONSRC) $(SHAREDSRC)
134
135 CLEANFILES = ypxfrd.h ypxfrd_xdr.c
136
137 IBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
138 ISBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
139 INETYPPROG= $(NETYPPROG:%=$(NETYP)/%)
140 INIS2LDAPPROG = $(NIS2LDAPPROG:%=$(NETYP)/%)
141
142 NIS2LDAPINC = -I$(SRC)/lib/libnisdb/yptol
143
144 CERRWARN += -_gcc=-Wno-implicit-function-declaration
145 CERRWARN += -_gcc=-Wno-parentheses
146 CERRWARN += -_gcc=-Wno-unused-variable
147 CERRWARN += -_gcc=-Wno-uninitialized
148 CERRWARN += -_gcc=-Wno-switch
149 CERRWARN += -_gcc=-Wno-extra
150 CERRWARN += -_gcc=-Wno-unused-label
151 CERRWARN += -_gcc=-Wno-address
152 CERRWARN += -_gcc=-Wno-unused-function
153
154 #conditional assignments
155 ypalias.o := CPPFLAGS= -DMAIN $(CPPFLAGS.master)
156 makedbm.o := CPPFLAGS= $(CPPFLAGS.master)
157 yp_b_svc.o := CPPFLAGS += -DINIT_DEFAULT
158 ypxfrd_svc.o := CPPFLAGS += -Dmain=_main
159 ypxfr.o := CPPFLAGS += $(NIS2LDAPINC)
160 yppush.o := CPPFLAGS += $(NIS2LDAPINC)
161 $(NIS2LDAPPROG) := CPPFLAGS += $(NIS2LDAPINC)
162 $(SHAREDOBJ) := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
163 $(ROOTVAR_YP)/Makefile := FILEMODE= 555
164 $(ROOTVAR_YP)/nicknames := FILEMODE= 644
165 $(ROOTVAR_YP)/updaters := FILEMODE= 500
166 $(ROOTETC)/publickey := FILEMODE= 644
167 # non-default file attributes to avoid conflict with rpcsrc
168 NETYP = $(NETSVC)/yp
169
170
171 all:= TARGET= all
172 install:= TARGET= install
173 clean:= TARGET= clean
174 clobber:= TARGET= clobber
175 lint:= TARGET= lint
176 cstyle := TARGET= cstyle
177
178 all: $(SHAREDOBJ) $(SUBDIRS) $(PROG) $(TXTS)
179
180 # install rules
181 $(ROOTVAR_YP)/% \
182 $(ROOTETC)/%: net_files/%
183 $(INS.file)
184
185 $(ROOTVAR_YP)/% : net_files/%
186 $(INS.file)
187
188 $(NETYP)/%: %
189 $(INS.file)
190
191 .KEEP_STATE:
192
193 $(SHAREDOBJ): $(SHAREDSRC)
194 $(COMPILE.c) $(SHAREDSRC) -o $@ $<
195
196 ypbind: $(YPBINDOBJ)
197 $(LINK.c) $(YPBINDOBJ) -o $@ $(LDLIBS)
198 $(POST_PROCESS)
199
200 makedbm ypalias: $$@.o $(COMMONOBJ) $$(MAPFILES)
201 $(LINK.c) -o $@ $@.o $(COMMONOBJ) $(LDLIBS)
202 $(POST_PROCESS)
203
204 ypmatch: $(YPMATOBJ)
205 $(LINK.c) -o $@ $(YPMATOBJ) $(LDLIBS)
206 $(POST_PROCESS)
207
208 ypwhich: $(YPWHIOBJ)
209 $(LINK.c) -o $@ $(YPWHIOBJ) $(LDLIBS)
210 $(POST_PROCESS)
211
212 ypcat: $(YPCATOBJ)
213 $(LINK.c) -o $@ $(YPCATOBJ) $(LDLIBS)
214 $(POST_PROCESS)
215
216 ypxfrd_xdr.c: ypxfrd.x
217 $(RM) ypxfrd_xdr.c; $(RPCGEN) -C -c ypxfrd.x -o ypxfrd_xdr.c
218
219 ypxfrd.h: ypxfrd.x
220 $(RM) ypxfrd.h; $(RPCGEN) -C -h ypxfrd.x -o ypxfrd.h
221
222 ypxfrd_xdr.o ypxfrd_client.o: ypxfrd.h
223
224 #clnt_create_rsvd.o ypxfr.o: clnt_create_rsvd.h
225
226 ypxfrd: $(YPXFRDOBJ) $(SHAREDOBJ)
227 $(LINK.cc) $(YPXFRDOBJ) $(SHAREDOBJ) \
228 -o $@ $(LDLIBS) -lc
229 $(POST_PROCESS)
230
231 ypxfr: $(YPXFROBJ) $(COMMONOBJ) $(YPMASTEROBJ) $(SHAREDOBJ)
232 $(LINK.cc) -o $@ $(YPXFROBJ) $(YPMASTEROBJ) $(COMMONOBJ) \
233 $(SHAREDOBJ) $(LDLIBS)
234 $(POST_PROCESS)
235
236 ypserv: $(YPSERVOBJ) $(COMMONOBJ) $(SHAREDOBJ)
237 $(LINK.cc) $(YPSERVOBJ) $(COMMONOBJ) \
238 $(SHAREDOBJ) -o $@ $(LDLIBS)
239 $(POST_PROCESS)
240
241 yppush: $(YPPUSHOBJ) $(COMMONOBJ)
242 $(LINK.c) $(YPPUSHOBJ) $(COMMONOBJ) -o $@ $(LDLIBS)
243 $(POST_PROCESS)
244
245 udpublickey: $(UDPUBLICKEYOBJ)
246 $(LINK.c) $(UDPUBLICKEYOBJ) -o $@
247 $(POST_PROCESS)
248
249 mkalias: $(MKALIASOBJ)
250 $(LINK.c) $(MKALIASOBJ) -o $@ -lnsl
251 $(POST_PROCESS)
252
253 stdethers: $(STDETHERSOBJ)
254 $(LINK.c) $(STDETHERSOBJ) -o $@ -lsocket
255 $(POST_PROCESS)
256
257 stdhosts: $(STDHOSTSOBJ)
258 $(LINK.c) $(STDHOSTSOBJ) -o $@ $(LDLIBS)
259 $(POST_PROCESS)
260
261 install: all $(PROG) $(ROOTDIRS) $(ROOTETCFILE) $(ROOTYPFILES) $(IBINPROG) \
262 $(ISBINPROG) $(INETYPPROG) $(INIS2LDAPPROG) $(SUBDIRS) $(ROOTMANIFEST) \
263 $(ROOTSVCMETHOD)
264
265 $(ROOTDIRS):
266 $(INS.dir)
267
268 $(SUBDIRS): FRC
269 @cd $@; pwd; $(MAKE) $(TARGET)
270
271 lint := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
272
273 lint: $(SUBDIRS)
274 $(LINT.c) ypmatch.c nick.c -lnsl
275 $(LINT.c) ypwhich.c nick.c -lnsl
276 $(LINT.c) ypcat.c nick.c -lnsl
277 $(LINT.c) makedbm.c getlist.c yp_getalias.c
278 $(LINT.c) ypalias.c getlist.c yp_getalias.c
279 $(LINT.c) yp_b_svc.c yp_b_subr.c rpc_bootstrap.c getlist.c -lnsl
280 $(LINT.c) ypxfr.c ypxfrd_client.c ypxfrd_xdr.c getlist.c yp_getalias.c \
281 ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c -lnsl
282 $(LINT.c) yppush.c getlist.c yp_getalias.c -lnsl
283 $(LINT.c) udpublickey.c
284 $(LINT.c) mkalias.c -lnsl
285 $(LINT.c) stdethers.c -lsocket
286 $(LINT.c) stdhosts.c -lnsl
287 $(LINT.c) ypxfrd_svc.c ypxfrd_xdr.c ypxfrd_server.c \
288 ypserv_net_secure.c \
289 ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c \
290 -lnsl -lnisdb
291 $(LINT.c) ypserv.c ypserv_map.c ypserv_proc.c ypserv_ancil.c \
292 ypserv_resolv.c ypserv_resolv_common.c ypv1_xdr.c \
293 ypserv_net_secure.c getlist.c yp_getalias.c \
294 ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c \
295 -lnsl -lnisdb
296
297 check: $(CHKMANIFEST)
298
299 cstyle: $(SUBDIRS)
300 ${CSTYLE} `echo $(SRCS) | sed 's/ypinit.c//'`
301
302 clean: $(SUBDIRS)
303 $(RM) $(OBJS) $(CLEANFILES)
304
305 clobber: clean $(SUBDIRS)
306
307 FRC:
308
309 include ../Makefile.targ
|
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 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25 # Copyright 2015 RackTop Systems.
26 #
27
28 BINPROG = ypmatch ypwhich ypcat
29 SBINPROG = makedbm ypalias ypinit yppoll ypset
30 NETYPPROG = ypbind ypxfr yppush udpublickey mkalias \
31 multi multi.awk stdethers stdhosts \
32 ypxfr_1perday ypxfr_1perhour ypxfr_2perday \
33 ypstart ypstop
34 NIS2LDAPPROG = ypxfrd ypserv ypxfr
35 SVCMETHOD = yp
36 PROG= $(BINPROG) $(SBINPROG) $(NETYPPROG) $(NIS2LDAPPROG) $(SVCMETHOD)
37
38 MANIFEST = server.xml client.xml xfr.xml
39
40 include ../Makefile.cmd
41
42 ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
43
44 # installed directories
45 NETSVC = $(ROOTLIB)/netsvc
46 NETYP = $(NETSVC)/yp
47
48 ROOTVAR_YP = $(ROOT)/var/yp
49 ROOTBINDING = $(ROOTVAR_YP)/binding
50 ROOTDIRS = $(ROOT) $(ROOTUSR) $(ROOTLIB) $(ROOTETC) $(ROOTVAR) \
51 $(NETSVC) $(NETYP) $(ROOTVAR_YP) $(ROOTBINDING) \
52 $(ROOTUSRSBIN) $(ROOTBIN)
53
54 $(NIS2LDAPPROG) := LDLIBS += -lc -lnsl -lnisdb
55 ypinit := LDLIBS += -lnsl
56 yppoll := LDLIBS += -lnsl
57 ypset := LDLIBS += -lnsl
58 ypbind := LDLIBS += -lnsl
59 ypmatch := LDLIBS += -lnsl
60 ypwhich := LDLIBS += -lnsl
61 ypcat := LDLIBS += -lnsl
62 yppush := LDLIBS += -lnsl
63 mkalias := LDLIBS += -lnsl
64 stdhosts := LDLIBS += -lnsl
65 stdethers := LDLIBS += -lsocket
66 makedbm := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
67 makedbm := LDFLAGS += $(MAPFILES:%=-M%)
68
69 $(ROOTVAR_YP)/aliases := FILEMODE=555
70
71 YPFILES = Makefile aliases nicknames updaters
72 ETCFILES = publickey
73 ROOTYPFILES= $(YPFILES:%=$(ROOTVAR_YP)/%)
74 ROOTETCFILE= $(ETCFILES:%=$(ROOTETC)/%)
75
76 TXTS= $(ETCFILES:%=net_files/%) $(YPFILES:%=net_files/%)
77 SUBDIRS = yppasswd mknetid revnetgroup ypupdated yp2lscripts
78
79 #
80 # Some sort of obsolete idea of common files which are only now used by a
81 # few minor utilities
82 #
83 COMMONOBJ= getlist.o yp_getalias.o
84
85 #
86 # Objects shared between all the major components
87 #
88 SHARED_DIR= ./shared
89 SHAREDOBJ= $(SHARED_DIR)/utils.o $(SHARED_DIR)/lockmap.o $(SHARED_DIR)/ancil.o
90 SHAREDSRC = $(SHAREDOBJ:%.o=%.c)
91
92 YPBINDOBJ= yp_b_svc.o yp_b_subr.o rpc_bootstrap.o getlist.o
93 YPXFROBJ = ypxfr.o ypxfrd_client.o ypxfrd_xdr.o
94 YPMATOBJ = ypmatch.o nick.o
95 YPWHIOBJ = ypwhich.o nick.o
96 YPCATOBJ = ypcat.o nick.o
97 MAKEDBMOBJ = makedbm.o
98 YPALIASOBJ = ypalias.o
99 UDPUBLICKEYOBJ = udpublickey.o
100 MKALIASOBJ = mkalias.o
101 STDETHERSOBJ = stdethers.o
102 STDHOSTSOBJ = stdhosts.o
103 YPSERVOBJ = ypserv.o ypserv_map.o \
104 ypserv_proc.o ypserv_ancil.o \
105 ypserv_resolv.o ypserv_resolv_common.o \
106 ypv1_xdr.o ypserv_net_secure.o
107 YPPUSHOBJ = yppush.o
108 YPXFRDOBJ = ypxfrd_svc.o ypxfrd_xdr.o ypxfrd_server.o \
109 ypserv_net_secure.o
110
111 NETYPOBJ = $(YPXFROBJ) $(YPXFRDOBJ) $(YPSERVOBJ) $(YPPUSHOBJ) \
112 $(YPBINDOBJ) $(UDPUBLICKEYOBJ)
113 OBJS = $(NETYPOBJ) $(MKALIASOBJ) $(COMMONOBJ) $(SHAREDOBJ) \
114 $(YPPUSHOBJ) $(YPMATOBJ) $(YPWHIOBJ) $(YPCATOBJ) \
115 $(STDETHERSOBJ) $(STDHOSTSOBJ) $(MAKEDBMOBJ) $(YPALIASOBJ)
116
117 BINSRC = $(BINPROG:%=%.c)
118 SBINSRC = $(SBINPROG:%=%.c)
119 NETYPSRC = $(NETYPOBJ:%.o=%.c)
120 YPBINDSRC = $(YPBINSOBJ:%.o=%.c)
121 YPXFRSRC = $(YPXFROBJ:%.o=%.c)
122 YPMATSRC = $(YPMATOBJ:%.o=%.c)
123 YPWHISRC = $(YPWHIOBJ:%.o=%.c)
124 YPCATSRC = $(YPCATOBJ:%.o=%.c)
125 MAKEDBMSRC = $(MAKEDBMOBJ:%.o=%.c)
126 YPALIASSRC = $(YPALIASOBJ:%.o=%.c)
127 UDPUBLICKEYSRC = $(UDPUBLICKEYOBJ:%.o=%.c)
128 MKALIASSRC = $(MKALIASOBJ:%.o=%.c)
129 STDETHERSSRC = $(STDETHERSOBJ:%.o=%.c)
130 STDHOSTSSRC = $(STDHOSTSOBJ:%.o=%.c)
131 YPSERVSRC = $(YPSERVOBJ:%.o=%.c)
132 YPPUSHSRC = $(YPPUSHOBJ:%.o=%.c)
133 YPXFRDSRC = $(YPXFRDOBJ:%.o=%.c)
134 YPALLSRC = $(YPALLOBJ:%.o=%.c)
135 COMMONSRC = $(COMMONOBJ:%.o=%.c)
136
137 SRCS = $(BINSRC) $(SBINSRC) $(NETYPSRC) \
138 $(COMMONSRC) $(SHAREDSRC)
139
140 CLEANFILES = ypxfrd.h ypxfrd_xdr.c
141
142 IBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
143 ISBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
144 INETYPPROG= $(NETYPPROG:%=$(NETYP)/%)
145 INIS2LDAPPROG = $(NIS2LDAPPROG:%=$(NETYP)/%)
146
147 NIS2LDAPINC = -I$(SRC)/lib/libnisdb/yptol
148
149 CERRWARN += -_gcc=-Wno-implicit-function-declaration
150 CERRWARN += -_gcc=-Wno-parentheses
151 CERRWARN += -_gcc=-Wno-unused-variable
152 CERRWARN += -_gcc=-Wno-uninitialized
153 CERRWARN += -_gcc=-Wno-switch
154 CERRWARN += -_gcc=-Wno-extra
155 CERRWARN += -_gcc=-Wno-unused-label
156 CERRWARN += -_gcc=-Wno-address
157 CERRWARN += -_gcc=-Wno-unused-function
158
159 #conditional assignments
160 $(YPALIASOBJ) := CPPFLAGS= -DMAIN $(CPPFLAGS.master)
161 $(MAKEDBMOBJ) := CPPFLAGS= $(CPPFLAGS.master)
162 $(YPBINDOBJ) := CPPFLAGS += -DINIT_DEFAULT
163 ypxfrd_svc.o := CPPFLAGS += -Dmain=_main
164 $(YPXFROBJ) := CPPFLAGS += $(NIS2LDAPINC)
165 $(YPPUSHOBJ) := CPPFLAGS += $(NIS2LDAPINC)
166 $(NIS2LDAPPROG) := CPPFLAGS += $(NIS2LDAPINC)
167 $(SHAREDOBJ) := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
168 $(ROOTVAR_YP)/Makefile := FILEMODE= 555
169 $(ROOTVAR_YP)/nicknames := FILEMODE= 644
170 $(ROOTVAR_YP)/updaters := FILEMODE= 500
171 $(ROOTETC)/publickey := FILEMODE= 644
172 # non-default file attributes to avoid conflict with rpcsrc
173 NETYP = $(NETSVC)/yp
174
175
176 all:= TARGET= all
177 install:= TARGET= install
178 clean:= TARGET= clean
179 clobber:= TARGET= clobber
180 lint:= TARGET= lint
181 cstyle := TARGET= cstyle
182
183 all: $(SHAREDOBJ) .WAIT $(SUBDIRS) $(PROG) $(TXTS)
184
185 # install rules
186 $(ROOTVAR_YP)/% \
187 $(ROOTETC)/%: net_files/%
188 $(INS.file)
189
190 $(ROOTVAR_YP)/% : net_files/%
191 $(INS.file)
192
193 $(NETYP)/%: %
194 $(INS.file)
195
196 .KEEP_STATE:
197
198 $(SHARED_DIR)/%.o: $(SHARED_DIR)/%.c
199 $(COMPILE.c) -o $@ $<
200
201 ypbind: $(YPBINDOBJ)
202 $(LINK.c) $(YPBINDOBJ) -o $@ $(LDLIBS)
203 $(POST_PROCESS)
204
205 makedbm ypalias: $$@.o $(COMMONOBJ) $$(MAPFILES)
206 $(LINK.c) -o $@ $@.o $(COMMONOBJ) $(LDLIBS)
207 $(POST_PROCESS)
208
209 ypmatch: $(YPMATOBJ)
210 $(LINK.c) -o $@ $(YPMATOBJ) $(LDLIBS)
211 $(POST_PROCESS)
212
213 ypwhich: $(YPWHIOBJ)
214 $(LINK.c) -o $@ $(YPWHIOBJ) $(LDLIBS)
215 $(POST_PROCESS)
216
217 ypcat: $(YPCATOBJ)
218 $(LINK.c) -o $@ $(YPCATOBJ) $(LDLIBS)
219 $(POST_PROCESS)
220
221 ypxfrd_xdr.c: ypxfrd.x
222 $(RM) ypxfrd_xdr.c; $(RPCGEN) -C -c ypxfrd.x -o ypxfrd_xdr.c
223
224 ypxfrd.h: ypxfrd.x
225 $(RM) ypxfrd.h; $(RPCGEN) -C -h ypxfrd.x -o ypxfrd.h
226
227 ypxfrd_xdr.o ypxfrd_client.o: ypxfrd.h
228
229 ypxfrd: $(YPXFRDOBJ) $(SHAREDOBJ)
230 $(LINK.cc) $(YPXFRDOBJ) $(SHAREDOBJ) -o $@ $(LDLIBS)
231 $(POST_PROCESS)
232
233 ypxfr: $(YPXFROBJ) $(COMMONOBJ) $(SHAREDOBJ)
234 $(LINK.cc) -o $@ $(YPXFROBJ) $(COMMONOBJ) $(SHAREDOBJ) $(LDLIBS)
235 $(POST_PROCESS)
236
237 ypserv: $(YPSERVOBJ) $(COMMONOBJ) $(SHAREDOBJ)
238 $(LINK.cc) $(YPSERVOBJ) $(COMMONOBJ) $(SHAREDOBJ) -o $@ $(LDLIBS)
239 $(POST_PROCESS)
240
241 yppush: $(YPPUSHOBJ) $(COMMONOBJ)
242 $(LINK.c) $(YPPUSHOBJ) $(COMMONOBJ) -o $@ $(LDLIBS)
243 $(POST_PROCESS)
244
245 udpublickey: $(UDPUBLICKEYOBJ)
246 $(LINK.c) $(UDPUBLICKEYOBJ) -o $@ $(LDLIBS)
247 $(POST_PROCESS)
248
249 mkalias: $(MKALIASOBJ)
250 $(LINK.c) $(MKALIASOBJ) -o $@ $(LDLIBS)
251 $(POST_PROCESS)
252
253 stdethers: $(STDETHERSOBJ)
254 $(LINK.c) $(STDETHERSOBJ) -o $@ $(LDLIBS)
255 $(POST_PROCESS)
256
257 stdhosts: $(STDHOSTSOBJ)
258 $(LINK.c) $(STDHOSTSOBJ) -o $@ $(LDLIBS)
259 $(POST_PROCESS)
260
261 install: all $(PROG) $(ROOTDIRS) $(ROOTETCFILE) $(ROOTYPFILES) $(IBINPROG) \
262 $(ISBINPROG) $(INETYPPROG) $(INIS2LDAPPROG) $(SUBDIRS) $(ROOTMANIFEST) \
263 $(ROOTSVCMETHOD)
264
265 $(ROOTDIRS):
266 $(INS.dir)
267
268 $(SUBDIRS): FRC
269 @cd $@; pwd; $(MAKE) $(TARGET)
270
271 lint := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
272
273 lint: $(SUBDIRS)
274 $(LINT.c) $(UDPUBLICKEYSRC) $(LDLIBS)
275 $(LINT.c) $(MAKEDBMSRC) $(COMMONSRC) $(LDLIBS)
276 $(LINT.c) $(YPALIASSRC) $(COMMONSRC) $(LDLIBS)
277 $(LINT.c) $(YPMATSRC) $(LDLIBS) -lnsl
278 $(LINT.c) $(YPWHISRC) $(LDLIBS) -lnsl
279 $(LINT.c) $(YPCATSRC) $(LDLIBS) -lnsl
280 $(LINT.c) $(YPBINDSRC) $(LDLIBS) -lnsl
281 $(LINT.c) $(MKALIASSRC) $(LDLIBS) -lnsl
282 $(LINT.c) $(STDHOSTSSRC) $(LDLIBS) -lnsl
283 $(LINT.c) $(STDETHERSSRC) $(LDLIBS) -lsocket
284 $(LINT.c) $(YPPUSHSRC) $(COMMONSRC) $(LDLIBS) -lnsl
285 $(LINT.c) $(YPXFRSRC) $(COMMONSRC) $(SHAREDSRC) $(LDLIBS) -lnsl -lnisdb
286 $(LINT.c) $(YPSERVSRC) $(COMMONSRC) $(SHAREDSRC) $(LDLIBS) -lnsl -lnisdb
287
288 check: $(CHKMANIFEST)
289
290 cstyle: $(SUBDIRS)
291 ${CSTYLE} `echo $(SRCS) | sed 's/ypinit.c//'`
292
293 clean: $(SUBDIRS)
294 $(RM) $(OBJS) $(CLEANFILES)
295
296 clobber: clean $(SUBDIRS)
297
298 FRC:
299
300 include ../Makefile.targ
|