Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/rcm_daemon/Makefile.com
+++ new/usr/src/cmd/rcm_daemon/Makefile.com
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 #
23 23 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 # Copyright 2016 Nexenta Systems, Inc.
25 25 # Copyright (c) 2018, Joyent, Inc.
26 26 #
27 27
28 28 include ../../Makefile.cmd
29 29
30 30 COMMON = ../common
31 31
32 32 RCM_SRC = \
33 33 $(COMMON)/rcm_event.c \
34 34 $(COMMON)/rcm_main.c \
35 35 $(COMMON)/rcm_impl.c \
36 36 $(COMMON)/rcm_subr.c \
37 37 $(COMMON)/rcm_lock.c \
38 38 $(COMMON)/rcm_script.c
39 39
40 40 RCM_OBJ = \
41 41 rcm_event.o \
42 42 rcm_main.o \
43 43 rcm_impl.o \
44 44 rcm_subr.o \
45 45 rcm_lock.o \
46 46 rcm_script.o
47 47
48 48 COMMON_MOD_SRC = \
49 49 $(COMMON)/filesys_rcm.c \
50 50 $(COMMON)/dump_rcm.c \
51 51 $(COMMON)/swap_rcm.c \
52 52 $(COMMON)/network_rcm.c \
53 53 $(COMMON)/vlan_rcm.c \
54 54 $(COMMON)/vnic_rcm.c \
55 55 $(COMMON)/ibpart_rcm.c \
56 56 $(COMMON)/aggr_rcm.c \
57 57 $(COMMON)/ip_rcm.c \
58 58 $(COMMON)/cluster_rcm.c \
59 59 $(COMMON)/pool_rcm.c \
60 60 $(COMMON)/mpxio_rcm.c \
61 61 $(COMMON)/ip_anon_rcm.c \
62 62 $(COMMON)/bridge_rcm.c
63 63
64 64 sparc_MOD_SRC = $(COMMON)/ttymux_rcm.c
65 65
66 66 COMMON_PERL_SCRIPT_SRC =
67 67
68 68 sparc_PERL_SCRIPT_SRC = SUNW,vdevices.pl
69 69
70 70 COMMON_SHELL_SCRIPT_SRC = SUNW,ibsdpu.sh \
71 71 SUNW,rdsv3u.sh
72 72
73 73 COMMON_MOD_OBJ = \
74 74 filesys_rcm.o \
75 75 dump_rcm.o \
76 76 swap_rcm.o \
77 77 network_rcm.o \
78 78 vlan_rcm.o \
79 79 vnic_rcm.o \
80 80 ibpart_rcm.o \
81 81 aggr_rcm.o \
82 82 ip_rcm.o \
83 83 cluster_rcm.o \
84 84 pool_rcm.o \
85 85 mpxio_rcm.o \
86 86 ip_anon_rcm.o \
87 87 bridge_rcm.o
88 88
89 89 sparc_MOD_OBJ = ttymux_rcm.o
90 90
91 91 RCM_DAEMON = rcm_daemon
92 92
93 93 COMMON_RCM_MODS = \
94 94 SUNW_filesys_rcm.so \
95 95 SUNW_dump_rcm.so \
96 96 SUNW_swap_rcm.so \
97 97 SUNW_network_rcm.so \
98 98 SUNW_vlan_rcm.so \
99 99 SUNW_vnic_rcm.so \
100 100 SUNW_ibpart_rcm.so \
101 101 SUNW_aggr_rcm.so \
102 102 SUNW_ip_rcm.so \
103 103 SUNW_cluster_rcm.so \
104 104 SUNW_pool_rcm.so \
105 105 SUNW_mpxio_rcm.so \
106 106 SUNW_ip_anon_rcm.so \
107 107 SUNW_bridge_rcm.so
108 108
109 109 sparc_RCM_MODS = SUNW_ttymux_rcm.so
110 110
111 111 RCM_DIR = rcm
112 112 MOD_DIR = modules
113 113 SCRIPT_DIR = scripts
114 114
↓ open down ↓ |
114 lines elided |
↑ open up ↑ |
115 115 CLOBBERFILES += $(COMMON_RCM_MODS) $($(MACH)_RCM_MODS) $(RCM_DAEMON)
116 116
117 117 LINT_MODULES = $(COMMON_MOD_SRC:.c=.ln) $($(MACH)_MOD_SRC:.c=.ln)
118 118
119 119 CPPFLAGS += -I..
120 120 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
121 121 CFLAGS += $(CCVERBOSE) $(C_PICFLAGS)
122 122
123 123 CERRWARN += -_gcc=-Wno-parentheses
124 124 CERRWARN += -_gcc=-Wno-unused-label
125 -CERRWARN += -_gcc=-Wno-uninitialized
125 +CERRWARN += $(CNOWARN_UNINIT)
126 126 CERRWARN += -_gcc=-Wno-unused-function
127 127
128 128 # not linted
129 129 SMATCH=off
130 130
131 131 MAPFILES = ../common/mapfile-intf $(MAPFILE.NGB)
132 132 rcm_daemon := LDFLAGS += $(MAPFILES:%=-M%)
133 133
134 134 LINTFLAGS += -u -erroff=E_FUNC_ARG_UNUSED
135 135
136 136 LDLIBS_MODULES =
137 137 SUNW_pool_rcm.so := LDLIBS_MODULES += -L$(ROOT)/usr/lib -lpool
138 138 SUNW_network_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm
139 139 SUNW_vlan_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm
140 140 SUNW_vnic_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm
141 141 SUNW_ibpart_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm
142 142 SUNW_aggr_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm
143 143 SUNW_ip_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -linetutil -ldladm -lipmp -lipadm
144 144 SUNW_ip_anon_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -linetutil
145 145 SUNW_bridge_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm
146 146
147 147 LDLIBS += -lgen -lelf -lrcm -lnvpair -ldevinfo -lnsl -lsocket
148 148
149 149 SRCS = $(RCM_SRC) $(COMMON_MOD_SRC)
150 150
151 151 POFILES = $(SRCS:.c=.po)
152 152 POFILE = prcm_daemon.po
153 153
154 154 PERL_SCRIPTS = $(COMMON_PERL_SRC) $($(MACH)_PERL_SCRIPT_SRC)
155 155 SHELL_SCRIPTS = $(COMMON_SHELL_SCRIPT_SRC)
156 156 RCM_SCRIPTS = $(PERL_SCRIPTS) $(SHELL_SCRIPTS)
157 157
158 158 # install specifics
159 159
160 160 ROOTLIB_RCM = $(ROOTLIB)/$(RCM_DIR)
161 161 ROOTLIB_RCM_MOD = $(ROOTLIB_RCM)/$(MOD_DIR)
162 162 ROOTLIB_RCM_DAEMON = $(RCM_DAEMON:%=$(ROOTLIB_RCM)/%)
163 163 ROOTLIB_RCM_MODULES = $(COMMON_RCM_MODS:%=$(ROOTLIB_RCM_MOD)/%) \
164 164 $($(MACH)_RCM_MODS:%=$(ROOTLIB_RCM_MOD)/%)
165 165 ROOTLIB_RCM_SCRIPT = $(ROOTLIB_RCM)/$(SCRIPT_DIR)
166 166 ROOTLIB_RCM_SCRIPTS = $(RCM_SCRIPTS:%=$(ROOTLIB_RCM_SCRIPT)/%)
167 167 ROOTETC_RCM = $(ROOTETC)/$(RCM_DIR)
168 168 ROOTETC_RCM_SCRIPT = $(ROOTETC_RCM)/$(SCRIPT_DIR)
169 169
170 170 all := TARGET= all
171 171 install := TARGET= install
172 172 clean := TARGET= clean
173 173 clobber := TARGET= clobber
174 174 lint := TARGET= lint
175 175
176 176 $(ROOTLIB_RCM_SCRIPTS) := FILEMODE = 555
177 177
178 178 .KEEP_STATE:
179 179
180 180 all: $(RCM_DAEMON) $(COMMON_RCM_MODS) $($(MACH)_RCM_MODS)
181 181
182 182 install: all \
183 183 $(ROOTLIB_RCM) \
184 184 $(ROOTLIB_RCM_DAEMON) \
185 185 $(ROOTLIB_RCM_MOD) \
186 186 $(ROOTLIB_RCM_MODULES) \
187 187 $(ROOTLIB_RCM_SCRIPT) \
188 188 $(ROOTETC_RCM) \
189 189 $(ROOTETC_RCM_SCRIPT) \
190 190 $(ROOTLIB_RCM_SCRIPTS)
191 191
192 192 clean:
193 193 $(RM) $(RCM_OBJ) $(COMMON_MOD_OBJ) $($(MACH)_MOD_OBJ) $(POFILES)
194 194
195 195 lint: $(RCM_DAEMON).ln $(LINT_MODULES)
196 196
197 197 $(RCM_DAEMON).ln: FRC
198 198 $(LINT.c) $(RCM_SRC) $(LDLIBS)
199 199
200 200 %.ln: FRC
201 201 $(LINT.c) $(RCM_SRC) $(@:.ln=.c) $(LDLIBS)
202 202
203 203 FRC:
204 204
205 205 include ../../Makefile.targ
206 206
207 207 $(POFILE): $(POFILES)
208 208 $(RM) $@; cat $(POFILES) > $@
209 209
210 210 $(RCM_DAEMON): $(RCM_OBJ) $(MAPFILES)
211 211 $(LINK.c) -o $@ $< $(RCM_OBJ) $(LDLIBS)
212 212 $(POST_PROCESS)
213 213
214 214 SUNW_%.so: %.o
215 215 $(LINK.c) -o $@ $(GSHARED) -h $@ $< $(LDLIBS_MODULES)
216 216
217 217 %.o: $(COMMON)/%.c
218 218 $(COMPILE.c) -o $@ $<
219 219
220 220 $(ROOTLIB_RCM):
221 221 $(INS.dir)
222 222
223 223 $(ROOTLIB_RCM)/%: %
224 224 $(INS.file)
225 225
226 226 $(ROOTLIB_RCM_MOD):
227 227 $(INS.dir)
228 228
229 229 $(ROOTLIB_RCM_MOD)/%: %
230 230 $(INS.file)
231 231
232 232 $(ROOTLIB_RCM_SCRIPT):
233 233 $(INS.dir)
234 234
235 235 $(ROOTETC_RCM):
236 236 $(INS.dir)
237 237
238 238 $(ROOTETC_RCM_SCRIPT):
239 239 $(INS.dir)
240 240
241 241 $(ROOTLIB_RCM_SCRIPT)/%: $(COMMON)/%
242 242 $(INS.file)
↓ open down ↓ |
107 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX