Print this page
4027 remove CLOSED_BUILD
4028 remove CLOSED_IS_PRESENT
4029 remove tonic build bits
Reviewed by: Andy Stormont <andyjstormont@gmail.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sun4u/Makefile
+++ new/usr/src/uts/sun4u/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 sun4u architecture.
27 27 #
28 28
29 29 UTSBASE = ..
30 30
31 31 include Makefile.sun4u
32 32
33 33 #
34 34 # The following are SPARC specific (rather than sun4u) specific modules
35 35 # which are required for the sun4u kernel to completely lint. They are
36 36 # not involved in the build in any other way. In order to minimize
37 37 # build time, it is assumed that they are up to date. But since sun4u
38 38 # is really a separate architecture we cannot use the v7 sparc modules.
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
39 39 #
40 40 SPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
41 41
42 42 SPARC_LINTS =
43 43
44 44 #
45 45 #
46 46 #
47 47 LINT_LIBS = $(LINT_LIB) \
48 48 $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
49 - $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
50 49 $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
51 50
52 51
53 52 def := TARGET= def
54 53 def.prereq := TARGET= def
55 54 all := TARGET= all
56 55 all.prereq := TARGET= all
57 56 install := TARGET= install
58 57 install.prereq := TARGET= all
59 58 install_h := TARGET= install_h
60 59 install_h.prere := TARGET= install_h
61 60 clean := TARGET= clean
62 61 clobber := TARGET= clobber
63 62 lint := TARGET= lint
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
64 63 lint.prereq := TARGET= lint
65 64 lintlib := TARGET= lintlib
66 65 modlintlib := TARGET= modlintlib
67 66 modlist := TARGET= modlist
68 67 modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
69 68 clean.lint := TARGET= clean.lint
70 69 check := TARGET= check
71 70
72 71 .KEEP_STATE:
73 72
74 -.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
75 - $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) \
73 +.PARALLEL: $(PARALLEL_KMODS) $(XMODS) \
74 + $(IMPLEMENTATIONS) \
76 75 modlist modlist.sparc
77 76
78 77 # Override for CPU_KMODS... they cannot be built
79 78 # in parallel
80 79 .NO_PARALLEL: $(CPU_KMODS)
81 80
82 81 def all clean clobber clean.lint: genassym unix .WAIT \
83 - $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
84 - $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
82 + $(KMODS) $(XMODS) $(IMPLEMENTATIONS)
85 83
86 84 clobber: clobber.targ
87 85
88 86 # list the modules under sun4u.
89 -modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
90 - $(IMPLEMENTATIONS:.WAIT=) $(CLOSED_IMPLEMENTATIONS)
87 +modlist: unix $(KMODS) $(XMODS) $(IMPLEMENTATIONS:.WAIT=)
91 88
92 89 # list the modules for Install -k sun4u.
93 90 modlist.karch: modlist modlist.sparc
94 91
95 92 modlist.sparc:
96 93 @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
97 94
98 -install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
99 - $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
95 +install: install_platforms genassym unix .WAIT $(KMODS) \
96 + $(XMODS) $(IMPLEMENTATIONS)
100 97
101 98 lintlib: unix
102 99
103 -modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
100 +modlintlib: $(LINT_KMODS)
104 101
105 102 genassym unix $(KMODS): FRC
106 103 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
107 104
108 105 #
109 106 # Privilege constants
110 107 #
111 108 # NOTE: The rules for generating priv_const.c file are shared between all
112 109 # processor architectures and should be kept in sync. If they are changed in
113 110 # this file make sure that x86 rules are updated as well.
114 111 #
115 112 PRIVS_C = $(UTSBASE)/common/os/priv_const.c
116 113
117 114 $(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF)
118 115 $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@
119 116
120 117 CLOBBERFILES += $(PRIVS_C)
121 118
122 119 #
123 120 # Prerequisites
124 121 #
125 122 # The uts/Makefile defines build parallelism for sun4 platforms such that sparc,
126 123 # sun4u and sun4v are all built in parallel. Also this Makefile specifies that
127 124 # all IMPLEMENTATIONS sun4u sub-platforms are built in parallel. This requires
128 125 # building certain parts before the parallel build can start. The uts/Makefile
129 126 # appends the '.prereq' string to the original target and executes this Makefile
130 127 # to build any prerequisites needed before the full parallel build can start.
131 128 # After that make continues with normal targets.
132 129 #
133 130 # Any build prerequisites for sun4 and IMPLEMENTATIONS builds should be
134 131 # described here.
135 132 #
136 133 # genassym is used to build dtrace and genunix, so it should be built first.
137 134 #
138 135 # priv_const.c is required to build genunix.
139 136 #
140 137 # genunix is used by everyone to ctfmerge with. Genunix is merged with sparc/ip
141 138 # so as a side effect this dependency builds sparc/ip as part of the
142 139 # prerequisites.
143 140 #
144 141 # unix is not required by itself but several sun4u platforms require
145 142 # sun4u/platmod to be present. The easiest way to achieve this is to build
146 143 # sun4u/unix first since sun4u/unix Makefile builds sun4u/platform correctly.
147 144 # This causes full sun4u/unix to be built before all sun4u platforms and
148 145 # before uts/sun4v and uts/sparc, but it acceptable since it is not spending
149 146 # too much time building sun4u/unix.
150 147 #
151 148 all.prereq def.prereq install.prereq: genassym genunix unix
152 149
153 150 #
154 151 # Various sun4u platforms expect proto/root_sparc/platform/sun4u/include to be
155 152 # present. This is handled by running make install_h in sun4u/unix directory
156 153 # first.
157 154 #
158 155 install_h.prereq: FRC
159 156 @cd sys; pwd; $(MAKE) $(TARGET)
160 157
161 158 #
162 159 # sun4u/unix and sun4u/genunix should be linted first since sparc does global
163 160 # cross-check with these lint libraries. The sun4u/unix and sun4u/genunix can be
164 161 # linted in parallel.
165 162 #
166 163 LINT_PREREQ = unix.lint genunix.lint
167 164 lint.prereq: $(LINT_PREREQ)
168 165
169 166 .PARALLEL: $(LINT_PREREQ)
170 167
171 168 $(LINT_PREREQ):
172 169 @cd $(@:%.lint=%); pwd; $(MAKE) $(TARGET)
173 170
174 171 #
175 172 # Nothing to do with any other prerequisites
176 173 #
177 174 %.prereq:
178 175
179 176 #
180 177 # Platform inter-dependencies
181 178 #
182 179 lw8: serengeti
183 180
184 181 quasar: darwin
185 182
186 183 #
187 184 # The genunix requires priv_const.c file to be generated first.
↓ open down ↓ |
74 lines elided |
↑ open up ↑ |
188 185 #
189 186 genunix: $(PRIVS_C)
190 187
191 188 #
192 189 # Rules
193 190 #
194 191
195 192 $(IMPLEMENTATIONS): FRC
196 193 @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
197 194
198 -$(CLOSED_IMPLEMENTATIONS): FRC
199 - cd $(CLOSED)/uts/sun4u/$@; pwd; \
200 - THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET); \
201 -
202 195 $(XMODS): FRC
203 196 @if [ -f $@/Makefile ]; then \
204 197 cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
205 198 else \
206 199 true; \
207 200 fi
208 201
209 -$(CLOSED_XMODS): FRC
210 - @if [ -f $(CLOSED)/uts/sun4u/$@/Makefile ]; then \
211 - cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
212 - else \
213 - true; \
214 - fi
215 -
216 -$(CLOSED_KMODS): FRC
217 - cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
218 -
219 202 install_h check: install_platforms $(IMPLEMENTATIONS) \
220 - $(CLOSED_IMPLEMENTATIONS) FRC
221 203 @cd sys; pwd; $(MAKE) $(TARGET)
222 204 @cd vm; pwd; $(MAKE) $(TARGET)
223 205
224 206 #
225 207 # Rules for the /platforms directories. This is hardwired here because
226 208 # the first stage of the project (KBI) only implements the userland
227 209 # changes, but the only reasonable place to record the aliases is
228 210 # here in kernel land.
229 211 #
230 212 $(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
231 213 -$(INS.dir)
232 214
233 215 #
234 216 # create directories in /usr/platform/ for the implementations that are
235 217 # defined in $(IMPLEMENTED_PLATFORM)
236 218 # (eg. SUNW,Ultra-1)
237 219 #
238 220 # Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
239 221 # that are linked to it.
240 222 #
241 223 $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
242 224 -$(INS.dir)
243 225
244 226 #
245 227 # create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
246 228 # to it's corresponding $(IMPLEMENTED_PLATFORM).
247 229 #
248 230 PLATFORMS = $(LINKED_PLATFORMS)
249 231
250 232 $(USR_PLAT_DIRS): $(USR_PLAT_DIR)
251 233 $(INS.slink3)
252 234
253 235 PLATFORMS += $(IMPLEMENTED_PLATFORM)
254 236
255 237 #
256 238 # Make the /platforms directories. This is hardwired here because
257 239 # the first stage of the project (KBI) only implements the userland
258 240 # changes, but the only reasonable place to record the aliases is
259 241 # here in kernel land.
260 242 #
261 243 install_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
262 244 $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
263 245 $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
264 246 $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR)
265 247
266 248 #
267 249 # rules for making include, sbin, lib dirs/links in
268 250 # /usr/platform/$(PLATFORM)/ for desktop platforms
269 251 #
270 252 $(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
271 253 $(INS.slink4)
272 254
273 255 $(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
274 256 $(INS.slink5)
275 257
276 258 $(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
277 259 -$(INS.dir)
278 260
279 261 #
↓ open down ↓ |
49 lines elided |
↑ open up ↑ |
280 262 # Full kernel lint target.
281 263 #
282 264 LINT_TARGET = globallint
283 265
284 266 globallint:
285 267 @pwd
286 268 @-$(ECHO) "\nSUN4U KERNEL: global crosschecks:"
287 269 @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
288 270
289 271 lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
290 - $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) $(CPU_KMODS)
272 + $(IMPLEMENTATIONS) $(CPU_KMODS)
291 273
292 274 include ../Makefile.targ
293 275
294 276 #
295 277 # Cross-reference customization: build a cross-reference over all of the
296 278 # sun4u-related directories.
297 279 #
298 -SHARED_XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
299 -CLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
300 -XRDIRS = $(SHARED_XRDIRS)
301 -$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=)
302 -
280 +XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
303 281 XRPRUNE = i86pc
304 282
305 283 cscope.out tags: FRC
306 284 $(XREF) -x $@
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX