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