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