Print this page
first pass
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sun4v/Makefile
+++ new/usr/src/uts/sun4v/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 # This makefile drives the production of all implementation architecture
26 26 # dependent modules for the sun4v architecture.
27 27 #
28 28
29 29 UTSBASE = ..
30 30
31 31 include Makefile.sun4v
32 32 include Makefile.stpaul
33 33 include Makefile.huron
34 34 include Makefile.maramba
35 35 include Makefile.thunder
36 36 include Makefile.turgo
37 37 include Makefile.congo
38 38 include Makefile.monza
39 39
40 40 USR_GLENDALE_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320
41 41 USR_GLENDALE_SBIN_DIR = $(USR_GLENDALE_DIR)/sbin
42 42 USR_GLENDALE_LIB_DIR = $(USR_GLENDALE_DIR)/lib
43 43
44 44
45 45 #
46 46 # The following are SPARC specific (rather than sun4v) specific modules
47 47 # which are required for the sun4v kernel to completely lint. They are
48 48 # not involved in the build in any other way. In order to minimize
49 49 # build time, it is assumed that they are up to date. But since sun4v
50 50 # is really a separate architecture we cannot use the v7 sparc modules.
51 51 #
52 52 SPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
53 53
54 54 SPARC_LINTS =
55 55
56 56 #
57 57 #
58 58 #
59 59 LINT_LIBS = $(LINT_LIB) \
60 60 $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
61 61 $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
62 62 $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
63 63
64 64 def := TARGET= def
65 65 all := TARGET= all
66 66 install := TARGET= install
67 67 install_h := TARGET= install_h
68 68 clean := TARGET= clean
69 69 clobber := TARGET= clobber
70 70 lint := TARGET= lint
71 71 lintlib := TARGET= lintlib
72 72 modlintlib := TARGET= modlintlib
73 73 modlist := TARGET= modlist
74 74 modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
75 75 clean.lint := TARGET= clean.lint
76 76 check := TARGET= check
77 77
78 78 .KEEP_STATE:
79 79
80 80 .PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
81 81 modlist modlist.sparc
82 82
83 83 # Override for CPU_KMODS... they cannot be built
84 84 # in parallel
85 85 .NO_PARALLEL: $(CPU_KMODS)
86 86
87 87 def all clean clobber clean.lint: genassym unix .WAIT \
88 88 $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
89 89
90 90 # list the modules under sun4v.
91 91 modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
92 92 $(IMPLEMENTATIONS)
93 93
94 94 # list the modules for Install -k sun4v.
95 95 modlist.karch: modlist modlist.sparc
96 96
97 97 modlist.sparc:
98 98 @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
99 99
100 100 install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
101 101 $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
102 102
103 103 lintlib: unix
104 104
105 105 modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
106 106
107 107 genassym unix $(KMODS): FRC
108 108 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
109 109
110 110 $(IMPLEMENTATIONS): FRC
111 111 @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
112 112
113 113 $(XMODS): FRC
114 114 @if [ -f $@/Makefile ]; then \
115 115 cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
116 116 else \
117 117 true; \
118 118 fi
119 119
120 120 $(CLOSED_XMODS): FRC
121 121 @if [ -f $(CLOSED)/uts/sun4v/$@/Makefile ]; then \
122 122 cd $(CLOSED)/uts/sun4v/$@; pwd; \
123 123 $(MAKE) $(NO_STATE) $(TARGET); \
124 124 else \
125 125 true; \
126 126 fi
127 127
128 128 $(CLOSED_KMODS): FRC
129 129 cd $(CLOSED)/uts/sun4v/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
130 130
131 131 install_h check: install_platforms $(IMPLEMENTATIONS) FRC
132 132 @cd sys; pwd; $(MAKE) $(TARGET)
133 133 @cd vm; pwd; $(MAKE) $(TARGET)
134 134
135 135 #
136 136 # Rules for the /platforms directories. This is hardwired here because
137 137 # the first stage of the project (KBI) only implements the userland
138 138 # changes, but the only reasonable place to record the aliases is
139 139 # here in kernel land.
140 140 #
141 141 $(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
142 142 -$(INS.dir)
143 143
144 144 $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR)
145 145 $(INS.slink1)
146 146
147 147 #
148 148 # create directories in /usr/platform/ for the implementations that are
149 149 # defined in $(IMPLEMENTED_PLATFORM)
150 150 #
151 151
152 152 # Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
153 153 # that are linked to it.
154 154 #
155 155 $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
156 156 -$(INS.dir)
157 157
158 158 #
159 159 # create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
160 160 # to it's corresponding $(IMPLEMENTED_PLATFORM).
161 161 #
162 162 PLATFORMS = $(LINKED_PLATFORMS)
163 163
164 164 $(USR_PLAT_DIRS): $(USR_PLAT_DIR)
165 165 $(INS.slink3)
166 166
167 167 PLATFORMS += $(IMPLEMENTED_PLATFORM)
168 168
169 169
170 170 #
171 171 # Make the /platforms directories. This is hardwired here because
172 172 # the first stage of the project (KBI) only implements the userland
173 173 # changes, but the only reasonable place to record the aliases is
174 174 # here in kernel land.
175 175 #
176 176
177 177 install_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
178 178 $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
179 179 $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
180 180 $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
181 181 $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR) \
182 182 $(USR_STPAUL_DIR) $(USR_STPAUL_SBIN_DIR) \
183 183 $(USR_STPAUL_LIB_DIR) \
184 184 $(USR_GLENDALE_DIR) $(USR_GLENDALE_SBIN_DIR) \
185 185 $(USR_GLENDALE_LIB_DIR) \
186 186 $(USR_HURON_DIR) \
187 187 $(USR_HURON_SBIN_DIR) $(USR_HURON_LIB_DIR) \
188 188 $(USR_MARAMBA_DIR) $(USR_MARAMBA_SBIN_DIR) \
189 189 $(USR_MARAMBA_LIB_DIR) \
190 190 $(USR_THUNDER_DIR) $(USR_THUNDER_SBIN_DIR) \
191 191 $(USR_THUNDER_LIB_DIR) \
192 192 $(USR_TURGO_DIR) $(USR_TURGO_SBIN_DIR) \
193 193 $(USR_TURGO_LIB_DIR) \
194 194 $(USR_CONGO_DIR) $(USR_CONGO_SBIN_DIR) \
195 195 $(USR_CONGO_LIB_DIR) \
196 196 $(USR_MONZA_DIR) \
197 197 $(USR_MONZA_SBIN_DIR) $(USR_MONZA_SBIN_LINKS)
198 198
199 199
200 200 #
201 201 # rules for making include, sbin, lib dirs/links in
202 202 # /usr/platform/$(PLATFORM)/ for desktop platforms
203 203 #
204 204 $(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
205 205 $(INS.slink4)
206 206
207 207 $(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
208 208 $(INS.slink5)
209 209
210 210 $(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
211 211 -$(INS.dir)
212 212
213 213 $(USR_STPAUL_DIR): $(USR_SUN4V_PLAT_DIR)
214 214 -$(INS.dir)
215 215
216 216 $(USR_STPAUL_SBIN_DIR): $(USR_STPAUL_DIR)
217 217 $(INS.slink5)
218 218
219 219 $(USR_STPAUL_LIB_DIR): $(USR_STPAUL_DIR)
220 220 -$(INS.dir)
221 221
222 222 $(USR_HURON_DIR): $(USR_SUN4V_PLAT_DIR)
223 223 -$(INS.dir)
224 224
225 225 $(USR_HURON_SBIN_DIR): $(USR_HURON_DIR)
226 226 $(INS.slink5)
227 227
228 228 $(USR_HURON_LIB_DIR): $(USR_HURON_DIR)
229 229 -$(INS.dir)
230 230
231 231 $(USR_GLENDALE_DIR): $(USR_SUN4V_PLAT_DIR)
232 232 -$(INS.dir)
233 233
234 234 $(USR_GLENDALE_SBIN_DIR): $(USR_GLENDALE_DIR)
235 235 $(INS.slink5)
236 236
237 237 $(USR_GLENDALE_LIB_DIR): $(USR_GLENDALE_DIR)
238 238 -$(INS.dir)
239 239
240 240 $(USR_MARAMBA_DIR): $(USR_SUN4V_PLAT_DIR)
241 241 -$(INS.dir)
242 242
243 243 $(USR_MARAMBA_SBIN_DIR): $(USR_MARAMBA_DIR)
244 244 $(INS.slink5)
245 245
246 246 $(USR_MARAMBA_LIB_DIR): $(USR_MARAMBA_DIR)
247 247 -$(INS.dir)
248 248
249 249 $(USR_THUNDER_DIR): $(USR_SUN4V_PLAT_DIR)
250 250 -$(INS.dir)
251 251
252 252 $(USR_THUNDER_SBIN_DIR): $(USR_THUNDER_DIR)
253 253 $(INS.slink5)
254 254
255 255 $(USR_THUNDER_LIB_DIR): $(USR_THUNDER_DIR)
256 256 -$(INS.dir)
257 257
258 258 $(USR_TURGO_DIR): $(USR_SUN4V_PLAT_DIR)
259 259 -$(INS.dir)
260 260
261 261 $(USR_TURGO_SBIN_DIR): $(USR_TURGO_DIR)
262 262 $(INS.slink5)
263 263
264 264 $(USR_TURGO_LIB_DIR): $(USR_TURGO_DIR)
265 265 -$(INS.dir)
266 266
267 267 $(USR_CONGO_DIR): $(USR_SUN4V_PLAT_DIR)
268 268 -$(INS.dir)
269 269
270 270 $(USR_CONGO_SBIN_DIR): $(USR_CONGO_DIR)
271 271 $(INS.slink5)
272 272
273 273 $(USR_CONGO_LIB_DIR): $(USR_CONGO_DIR)
274 274 -$(INS.dir)
275 275
276 276 $(USR_MONZA_DIR): $(USR_SUN4V_PLAT_DIR)
277 277 -$(INS.dir)
278 278
279 279 $(USR_MONZA_SBIN_DIR): $(USR_MONZA_DIR)
280 280 -$(INS.dir)
281 281
282 282 $(USR_MONZA_SBIN_LINKS): $(USR_MONZA_SBIN_DIR)
283 283 $(INS.slink7)
284 284
285 285 #
286 286 # Full kernel lint target.
↓ open down ↓ |
286 lines elided |
↑ open up ↑ |
287 287 #
288 288 LINT_TARGET = globallint
289 289
290 290 globallint:
291 291 @-$(ECHO) "\nSUN4V KERNEL: global crosschecks:"
292 292 @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
293 293
294 294 lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
295 295 $(IMPLEMENTATIONS) $(LINT_CPU_KMODS)
296 296
297 -# EXPORT DELETE START
298 -
299 -EXPORT_SRC:
300 - $(RM) Makefile+
301 - sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
302 - < Makefile > Makefile+
303 - $(MV) Makefile+ Makefile
304 - $(CHMOD) 444 Makefile
305 -
306 -# EXPORT DELETE END
307 -
308 297 include ../Makefile.targ
309 298
310 299 #
311 300 # Cross-reference customization: build a cross-reference over all of the
312 301 # sun4v-related directories.
313 302 #
314 303 SHARED_XRDIRS = ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common
315 304 CLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
316 305 XRDIRS = $(SHARED_XRDIRS)
317 306 $(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=)
318 307
319 308 XRPRUNE = i86pc sun4u intel
320 309
321 310 cscope.out tags: FRC
322 311 $(XREF) -x $@
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX