Print this page
10804 Enable unused warnings outside of uts
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/cmd-inet/usr.sbin/Makefile
+++ new/usr/src/cmd/cmd-inet/usr.sbin/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.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
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 #
23 23 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 -# Copyright (c) 2018, Joyent, Inc.
25 +# Copyright 2019, Joyent, Inc.
26 26 #
27 27
28 28 SYNCPROG= syncinit syncloop syncstat
29 29
30 30 PROG= 6to4relay arp if_mpadm \
31 31 in.comsat in.fingerd in.rarpd in.rexecd in.rlogind \
32 32 in.rshd in.rwhod in.telnetd in.tftpd ipaddrsel \
33 33 ndd ndp $(SYNCPROG)
34 34
35 35 MANIFEST= rarp.xml telnet.xml comsat.xml finger.xml \
36 36 login.xml shell.xml rexec.xml socket-filter-kssl.xml
37 37 SVCMETHOD= svc-sockfilter
38 38
39 39 ROOTFS_PROG= hostconfig route soconfig
40 40 SBINLINKS= hostconfig route
41 41
42 42 RPCSVCPROG= hostconfig
43 43 AUDITPROG= in.rexecd in.rlogind in.rshd in.telnetd
44 44 PAMPROG= in.rexecd in.rlogind in.rshd in.telnetd
45 45 SOCKETPROG= 6to4relay arp hostconfig if_mpadm in.comsat \
46 46 in.fingerd in.rarpd in.rexecd in.rlogind in.rshd \
47 47 in.rwhod in.telnetd in.tftpd ipaddrsel ndp route
48 48 NSLPROG= 6to4relay arp hostconfig in.comsat in.rarpd \
49 49 in.rexecd in.rlogind in.rshd in.rwhod in.telnetd \
50 50 in.tftpd ipaddrsel ndp route
51 51 CMDPROG= in.telnetd
52 52 K5PROGS= in.telnetd in.rlogind in.rshd
53 53 TSNETPROG= route
54 54 DLADMPROG= 6to4relay
55 55 DEFAULTFILES= telnetd.dfl
56 56
57 57 PROGSRCS= $(PROG:%=%.c)
58 58 TFTPDOBJS= in.tftpd.o tftpsubs.o
59 59 OTHERSRC= ../usr.bin/tftp/tftpsubs.c
60 60 K5RLOGINOBJS= in.rlogind.o
61 61 K5RSHDOBJS= in.rshd.o
62 62 K5TELNETOBJS= in.telnetd.o
63 63 SRCS= $(PROGSRCS) $(OTHERSRC)
64 64
65 65 SUBDIRS= ifconfig ilbadm in.rdisc in.routed \
66 66 in.talkd inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
67 67 kssl/kssladm kssl/ksslcfg nwamadm nwamcfg ping routeadm \
68 68 snoop sppptun traceroute wificonfig
69 69
70 70 MSGSUBDIRS= ifconfig ilbadm in.routed in.talkd \
71 71 inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
72 72 kssl/ksslcfg nwamadm nwamcfg routeadm sppptun snoop wificonfig
73 73
74 74 # As programs get lint-clean, add them here and to the 'lint' target.
75 75 # Eventually this hack should go away, and all in PROG should be
76 76 # lint-clean.
77 77 LINTCLEAN= 6to4relay arp in.rlogind in.rshd in.telnetd in.tftpd \
78 78 ipaddrsel ndp route \
79 79 in.rarpd if_mpadm $(SYNCPROG)
80 80 # Likewise, as subdirs get lint-clean, add them here. Once
81 81 # they're all clean, replace the dependency of the lint target
82 82 # with SUBDIRS. Also (sigh) deal with the commented-out build lines
83 83 # for the lint rule.
84 84 LINTSUBDIRS= ilbadm in.rdisc in.routed in.talkd inetadm \
85 85 inetconv ipmpstat ipqosconf ipsecutils kssl/kssladm \
86 86 kssl/ksslcfg nwamadm nwamcfg ping routeadm sppptun traceroute \
87 87 wificonfig
88 88 # And as programs are verified not to attempt to write into constants,
89 89 # -xstrconst should be used to ensure they stay that way.
90 90 CONSTCLEAN=
91 91
92 92 include ../../Makefile.cmd
93 93 ROOTMANIFESTDIR= $(ROOTSVCNETWORK)
94 94 $(ROOTMANIFEST) := FILEMODE= 444
95 95 include ../Makefile.cmd-inet
96 96
97 97 ROOTSBINPROG = $(ROOTFS_PROG:%=$(ROOTSBIN)/%)
98 98 ROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%)
99 99
100 100 COMMONOBJS= addr_match.o kcmd.o store_forw_creds.o
101 101 COMMONSRCS= $(COMMONOBJS:%.o=$(CMDINETCOMMONDIR)/%.c)
102 102 SRCS+= $(COMMONSRCS)
103 103
104 104 CERRWARN += -_gcc=-Wno-implicit-function-declaration
105 105 CERRWARN += -_gcc=-Wno-uninitialized
106 106 CERRWARN += -_gcc=-Wno-unused-variable
107 107 CERRWARN += -_gcc=-Wno-unused-function
108 108 CERRWARN += -_gcc=-Wno-parentheses
109 109 CERRWARN += -_gcc=-Wno-char-subscripts
110 110 CERRWARN += -_gcc=-Wno-extra
111 111 CERRWARN += -_gcc=-Wno-address
112 112
113 113 # "missing type for func"
114 114 SMATCH=off
115 115
116 116 #
117 117 # Message catalog
118 118 #
119 119 POFILES= 6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po \
120 120 soconfig.po
121 121 POFILE= usr.sbin.po
122 122
123 123 all:= TARGET= all
124 124 install:= TARGET= install
125 125 clean:= TARGET= clean
126 126 clobber:= TARGET= clobber
127 127 lint:= TARGET= lint
128 128 _msg:= TARGET= _msg
129 129
130 130 CLOBBERFILES += $(ROOTFS_PROG) $(PROG)
131 131 CLEANFILES += $(COMMONOBJS) $(K5RLOGINOBJS) $(K5RSHDOBJS) $(TFTPDOBJS) \
132 132 $(K5TELNETOBJS)
133 133
134 134 CPPFLAGS += -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I
135 135
136 136 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
137 137 K5LIBS=
138 138
139 139 # Eventually just plain CFLAGS should be += -v, but not until all in
140 140 # PROGS are lint clean.
141 141 $(LINTCLEAN) := CFLAGS += $(CCVERBOSE)
142 142 $(CONSTCLEAN) := CFLAGS += $(XSTRCONST)
143 143
144 144 $(SYNCPROG) := LDLIBS += -ldlpi
145 145 $(SOCKETPROG) := LDLIBS += -lsocket
146 146 $(NSLPROG) := LDLIBS += -lnsl
147 147 $(AUDITPROG) := LDLIBS += -lbsm
148 148 $(PAMPROG) := LDLIBS += -lpam
149 149 $(RPCSVCPROG) := LDLIBS += -lrpcsvc
150 150 $(K5PROGS) := LDFLAGS += $(KRUNPATH) \
151 151 -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
152 152 $(K5PROGS) := K5LIBS= -lmech_krb5
153 153 $(K5PROGS) := CPPFLAGS += -I$(SRC)/head \
154 154 -I$(SRC)/uts/common/ \
155 155 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
156 156 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
↓ open down ↓ |
121 lines elided |
↑ open up ↑ |
157 157 -I$(SRC)/lib/pam_modules/krb5
158 158 LDLIBS += $(K5LIBS)
159 159 $(TSNETPROG) := LDLIBS += -ltsnet
160 160 $(DLADMPROG) := LDLIBS += -ldladm
161 161
162 162 in.rarpd := LDLIBS += -linetutil -ldlpi
163 163 if_mpadm := LDLIBS += -linetutil -lipmp
164 164 if_mpadm.po := XGETFLAGS += -a
165 165 route := CPPFLAGS += -DNDEBUG
166 166 ndd := LDLIBS += -ldladm -lipadm
167 +$(RELEASE_BUILD)ndd := CERRWARN += -_gcc=-Wno-unused
167 168 in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-M%)
168 169
169 170 .KEEP_STATE:
170 171
171 172 .PARALLEL:
172 173
173 174 all: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) THIRDPARTYLICENSE.arp
174 175
175 176 #
176 177 # message catalog
177 178 #
178 179 _msg: $(MSGSUBDIRS) $(POFILE)
179 180
180 181 syncutil: $(SYNCPROG)
181 182
182 183 $(POFILE): $(POFILES)
183 184 $(RM) $@
184 185 cat $(POFILES) > $@
185 186
186 187 %.o: $(CMDINETCOMMONDIR)/%.c
187 188 $(COMPILE.c) -o $@ $<
188 189
189 190 in.telnetd: $(K5TELNETOBJS)
190 191 $(LINK.c) $(K5TELNETOBJS) -o $@ $(LDLIBS)
191 192 $(POST_PROCESS)
192 193
193 194 in.rlogind: $(K5RLOGINOBJS) $(COMMONOBJS)
194 195 $(LINK.c) $(K5RLOGINOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
195 196 $(POST_PROCESS)
196 197
197 198 in.rshd: $(K5RSHDOBJS) $(COMMONOBJS)
198 199 $(LINK.c) $(K5RSHDOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
199 200 $(POST_PROCESS)
200 201
201 202 in.tftpd: $(TFTPDOBJS)
202 203 $(LINK.c) $(TFTPDOBJS) -o $@ $(LDLIBS)
203 204 $(POST_PROCESS)
204 205
205 206 tftpsubs.o: $(OTHERSRC)
206 207 $(COMPILE.c) $(OTHERSRC) -o $@
207 208 $(POST_PROCESS_O)
208 209
209 210 $(ROOTUSRSBINLINKS):
210 211 -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
211 212
212 213 install: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) .WAIT $(ROOTUSRSBINPROG) \
213 214 $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) \
214 215 $(ROOTMANIFEST) $(ROOTSVCMETHOD) THIRDPARTYLICENSE.arp
215 216
216 217 THIRDPARTYLICENSE.arp: arp.c
217 218 $(SED) -n '/University of California/,/SUCH DAMAGE/p' arp.c > $@
218 219
219 220 CLOBBERFILES += THIRDPARTYLICENSE.arp
220 221
221 222 #
222 223 # The reason this rule checks for the existence of the
223 224 # Makefile is that some of the directories do not exist
224 225 # in our exportable source builds.
225 226 #
226 227 $(SUBDIRS): FRC
227 228 @if [ -f $@/Makefile ]; then \
228 229 cd $@; pwd; $(MAKE) $(TARGET); \
229 230 else \
230 231 true; \
231 232 fi
232 233
233 234 FRC:
234 235
235 236 check: $(CHKMANIFEST)
236 237
237 238 clean: $(SUBDIRS) clean_local
238 239 clean_local:
239 240 $(RM) $(CLEANFILES)
240 241
241 242 clobber: $(SUBDIRS) clobber_local
242 243 clobber_local: clean_local
243 244 $(RM) $(CLOBBERFILES)
244 245
245 246 lint: $(LINTSUBDIRS)
246 247 $(LINT.c) 6to4relay.c $(LDLIBS) -lsocket -ldladm
247 248 $(LINT.c) arp.c $(LDLIBS) -lsocket -lnsl
248 249 @# $(LINT.c) in.rexecd.c $(LDLIBS) -lbsm -lpam
249 250 $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \
250 251 -I$(SRC)/head -I$(SRC)/uts/common/ \
251 252 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
252 253 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
253 254 -I$(SRC)/lib/pam_modules/krb5 \
254 255 in.rlogind.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl
255 256 $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \
256 257 -I$(SRC)/head -I$(SRC)/uts/common/ \
257 258 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
258 259 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
259 260 -I$(SRC)/lib/pam_modules/krb5 \
260 261 in.rshd.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl
261 262 $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 \
262 263 -erroff=E_GLOBAL_COULD_BE_STATIC2 \
263 264 -I$(SRC)/head -I$(SRC)/uts/common/ \
264 265 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
265 266 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
266 267 -I$(SRC)/lib/pam_modules/krb5 \
267 268 in.telnetd.c $(LDLIBS) -lbsm -lpam -lsocket -lnsl
268 269 $(LINT.c) if_mpadm.c $(LDLIBS) -lsocket -lnsl -lipmp -linetutil
269 270 $(LINT.c) ipaddrsel.c $(LDLIBS) -lsocket -lnsl
270 271 $(LINT.c) route.c $(LDLIBS) -lsocket -lnsl -ltsnet
271 272 $(LINT.c) syncinit.c $(LDLIBS) -ldlpi
272 273 $(LINT.c) syncloop.c $(LDLIBS) -ldlpi
273 274 $(LINT.c) syncstat.c $(LDLIBS) -ldlpi
274 275 $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 in.rarpd.c $(LDLIBS) \
275 276 -lsocket -lnsl
276 277 $(LINT.c) ndp.c $(LDLIBS) \
277 278 -lsocket -lnsl
278 279 $(LINT.c) in.tftpd.c ../usr.bin/tftp/tftpsubs.c $(LDLIBS) \
279 280 -lsocket -lnsl
↓ open down ↓ |
103 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX