Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/cmd-inet/usr.bin/Makefile
+++ new/usr/src/cmd/cmd-inet/usr.bin/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 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26 26 # Copyright 2016 Toomas Soome <tsoome@me.com>
27 27 # Copyright (c) 2018, Joyent, Inc.
28 28 #
29 29
30 30 PROG= finger rdate ruptime rwho whois
31 31 SUIDPROG= rcp rlogin rsh
32 32 ALL= $(PROG) $(SUIDPROG)
33 33 SRCS= $(ALL:%=%.c)
34 34 KCMDPROGS= rcp rlogin rsh
35 35
36 36 SUBDIRS= chat dns-sd ftp nc nca netstat \
37 37 pppd pppdump pppstats rdist talk telnet tftp
38 38 SUBDIR1= talk
39 39 MSGSUBDIRS= nca talk
40 40
41 41 # As programs get lint-clean, add them here. Eventually.
42 42 # This hack should go away, and all in PROG should be lint-clean.
43 43 LINTCLEAN= rlogin.c rsh.c rcp.c rdate.c rwho.c whois.c
44 44
45 45 # Likewise, as subdirs get lint-clean, add them here. Once
46 46 # they're all clean, replace the dependency of the lint target
47 47 # with SUBDIRS. Also (sigh) deal with the commented-out build lines
48 48 # for the lint rule.
49 49 LINTSUBDIRS= nca netstat pppd pppstats tftp
50 50
51 51 include ../../Makefile.cmd
52 52 include ../Makefile.cmd-inet
53 53
54 54 COMMONOBJS= kcmd.o
55 55 COMMONPOFILES= $(COMMONOBJS:.o=.po)
56 56 COMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:.o=.c)
57 57
58 58 POFILES= rlogin.po rsh.po rcp.po $(COMMONPOFILES)
59 59 POFILE= usr.bin.po
60 60
61 61 CLOBBERFILES += $(ALL)
62 62 CLEANFILES += kcmd.o rcp.o rlogin.o rsh.o
63 63
64 64 all:= TARGET= all
65 65 install:= TARGET= install
↓ open down ↓ |
65 lines elided |
↑ open up ↑ |
66 66 clean:= TARGET= clean
67 67 clobber:= TARGET= clobber
68 68 lint:= TARGET= lint
69 69 _msg:= TARGET= _msg
70 70
71 71 ROOTSUIDPROG= $(SUIDPROG:%=$(ROOTBIN)/%)
72 72 $(ROOTSUIDPROG) := FILEMODE= 04555
73 73
74 74 CPPFLAGS += -DSYSV -DSTRNET -DBSD_COMP -I$(CMDINETCOMMONDIR)
75 75 CERRWARN += -_gcc=-Wno-parentheses
76 -CERRWARN += -_gcc=-Wno-uninitialized
76 +CERRWARN += $(CNOWARN_UNINIT)
77 77 CERRWARN += -_gcc=-Wno-unused-function
78 78
79 79 ruptime := SMOFF += leaks
80 80
81 81 # Eventually just plain CFLAGS should be += -v, but not until all in
82 82 # PROGS are lint clean.
83 83 $(LINTCLEAN) := CFLAGS += $(CCVERBOSE)
84 84
85 85 finger := CFLAGS += $(CCVERBOSE)
86 86 # Enable large file support for reading the lastlog file.
87 87 finger := CPPFLAGS += -D_FILE_OFFSET_BITS=64
88 88
89 89 finger := LDLIBS += -lnsl -lcurses -lsocket
90 90 rcp lint-rcp := LDLIBS += -lsocket -lsec -lsendfile
91 91 rdate lint-rdate:= LDLIBS += -lsocket
92 92 rlogin lint-rlogin := LDLIBS += -lnsl -lsocket
93 93 rsh lint-rsh := LDLIBS += -lsocket
94 94 whois lint-whois := LDLIBS += -lsocket
95 95
96 96 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
97 97 $(KCMDPROGS) := LDLIBS += -lnsl -lmech_krb5
98 98 $(KCMDPROGS) := LDFLAGS += $(ZIGNORE) $(KRUNPATH) \
99 99 -L$(ROOT)$(KLIBDIR_DO) \
100 100 -L$(ROOT)$(KLIBDIR_GL)
101 101 KCMDLINTS= $(KCMDPROGS:%=lint-%)
102 102
103 103 $(COMMONPOFILES) \
104 104 rlogin.po rcp.po rsh.po \
105 105 $(KCMDPROGS) \
106 106 $(KCMDLINTS) := CPPFLAGS += -DKERBEROS \
107 107 -I$(CMDINETCOMMONDIR) \
108 108 -I$(SRC)/lib/gss_mechs/mech_krb5 \
109 109 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
110 110 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
111 111 -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5
112 112
113 113 # "-erroff=E_NAME_USED_NOT_DEF2" and "-erroff=E_NAME_DEF_NOT_USED2"
114 114 # are required because lint problems in the Kerberos 5 framework.
115 115 $(KCMDLINTS) := LINTFLAGS += -lnsl \
116 116 -erroff=E_NAME_USED_NOT_DEF2 \
117 117 -erroff=E_NAME_DEF_NOT_USED2
118 118
119 119 # Extra source files to lint with
120 120 LINTXTRA=
121 121 $(KCMDLINTS) := LINTXTRA += $(COMMONSRCS)
122 122
123 123 ROOTSUNWRCP= $(ROOT)/usr/lib/sunw,rcp
124 124 ROOTRSHSYMLINK= $(ROOT)/usr/ucb/rsh
125 125 ROOTREMSHSYMLINK=$(ROOT)/usr/bin/remsh
126 126
127 127 .KEEP_STATE:
128 128
129 129 all: $(ALL) $(SUBDIRS)
130 130
131 131 install: all .WAIT $(ROOTPROG) $(ROOTSUIDPROG) \
132 132 $(SUBDIRS) $(ROOTSUNWRCP) $(ROOTRSHSYMLINK) $(ROOTREMSHSYMLINK)
133 133
134 134 # Messaging - copy $POFILES to $POFILE to work with the parent directory
135 135 # Makefile's '_msg' target.
136 136 #
137 137 _msg: $(MSGSUBDIRS) $(POFILES)
138 138 $(RM) $(POFILE)
139 139 $(CAT) $(POFILES) > $(POFILE)
140 140
141 141 $(COMMONPOFILES): $(COMMONSRCS)
142 142 $(COMPILE.cpp) $(COMMONSRCS) > $(@:.po=.c).i
143 143 $(XGETTEXT) $(XGETFLAGS) $(@:.po=.c).i
144 144 $(RM) $@
145 145 sed "/^domain/d" < messages.po > $@
146 146 $(RM) messages.po $(@:.po=.c).i
147 147
148 148 $(COMMONOBJS): $(COMMONSRCS)
149 149 $(COMPILE.c) $(COMMONSRCS)
150 150
151 151 rlogin: rlogin.o $(COMMONOBJS)
152 152 $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
153 153 $(POST_PROCESS)
154 154
155 155 rcp: rcp.o $(COMMONOBJS)
156 156 $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
157 157 $(POST_PROCESS)
158 158
159 159 rsh: rsh.o $(COMMONOBJS)
160 160 $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
161 161 $(POST_PROCESS)
162 162
163 163 $(ROOTSUNWRCP):
164 164 $(RM) $@; $(SYMLINK) ../bin/rcp $@
165 165
166 166 $(ROOTRSHSYMLINK):
167 167 $(RM) $@; $(SYMLINK) ../bin/rsh $@
168 168
169 169 $(ROOTREMSHSYMLINK):
170 170 $(RM) $@; $(SYMLINK) rsh $@
171 171
172 172 $(SUBDIRS): FRC
173 173 @cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
174 174
175 175 FRC:
176 176
177 177 clean: $(SUBDIRS) clean_local
178 178 clean_local:
179 179 $(RM) $(CLEANFILES)
180 180
181 181 clobber: $(SUBDIRS) clobber_local
182 182 clobber_local: clean_local
183 183 $(RM) $(CLOBBERFILES)
184 184
185 185 LINTLOCALS= $(LINTCLEAN:%.c=lint-%)
186 186
187 187 lint: $(LINTSUBDIRS) $(LINTLOCALS)
188 188
189 189 $(LINTLOCALS):
190 190 $(LINT.c) $(@:lint-%=%.c) $(LINTXTRA) $(LDLIBS)
↓ open down ↓ |
104 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX