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