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