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