4027 remove CLOSED_BUILD
[unleashed.git] / usr / src / uts / sun4v / Makefile
blob4597f6d9f4195932ac934074924da5ab85263ab2
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # This makefile drives the production of all implementation architecture
26 # dependent modules for the sun4v architecture.
29 UTSBASE = ..
31 include Makefile.sun4v
32 include Makefile.stpaul
33 include Makefile.huron
34 include Makefile.maramba
35 include Makefile.thunder
36 include Makefile.turgo
37 include Makefile.congo
38 include Makefile.monza
40 USR_GLENDALE_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320
41 USR_GLENDALE_SBIN_DIR = $(USR_GLENDALE_DIR)/sbin
42 USR_GLENDALE_LIB_DIR = $(USR_GLENDALE_DIR)/lib
46 # The following are SPARC specific (rather than sun4v) specific modules
47 # which are required for the sun4v kernel to completely lint. They are
48 # not involved in the build in any other way. In order to minimize
49 # build time, it is assumed that they are up to date. But since sun4v
50 # is really a separate architecture we cannot use the v7 sparc modules.
52 SPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
54 SPARC_LINTS =
59 LINT_LIBS = $(LINT_LIB) \
60 $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
61 $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
62 $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
64 def := TARGET= def
65 all := TARGET= all
66 install := TARGET= install
67 install_h := TARGET= install_h
68 clean := TARGET= clean
69 clobber := TARGET= clobber
70 lint := TARGET= lint
71 lintlib := TARGET= lintlib
72 modlintlib := TARGET= modlintlib
73 modlist := TARGET= modlist
74 modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
75 clean.lint := TARGET= clean.lint
76 check := TARGET= check
78 .KEEP_STATE:
80 .PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
81 modlist modlist.sparc
83 # Override for CPU_KMODS... they cannot be built
84 # in parallel
85 .NO_PARALLEL: $(CPU_KMODS)
87 def all clean clobber clean.lint: genassym unix .WAIT \
88 $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
90 # list the modules under sun4v.
91 modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
92 $(IMPLEMENTATIONS)
94 # list the modules for Install -k sun4v.
95 modlist.karch: modlist modlist.sparc
97 modlist.sparc:
98 @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
100 install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
101 $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
103 lintlib: unix
105 modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
107 genassym unix $(KMODS): FRC
108 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
110 $(IMPLEMENTATIONS): FRC
111 @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
113 $(XMODS): FRC
114 @if [ -f $@/Makefile ]; then \
115 cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
116 else \
117 true; \
120 $(CLOSED_XMODS): FRC
121 @if [ -f $(CLOSED)/uts/sun4v/$@/Makefile ]; then \
122 cd $(CLOSED)/uts/sun4v/$@; pwd; \
123 $(MAKE) $(NO_STATE) $(TARGET); \
124 else \
125 true; \
128 $(CLOSED_KMODS): FRC
129 cd $(CLOSED)/uts/sun4v/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
131 install_h check: install_platforms $(IMPLEMENTATIONS) FRC
132 @cd sys; pwd; $(MAKE) $(TARGET)
133 @cd vm; pwd; $(MAKE) $(TARGET)
136 # Rules for the /platforms directories. This is hardwired here because
137 # the first stage of the project (KBI) only implements the userland
138 # changes, but the only reasonable place to record the aliases is
139 # here in kernel land.
141 $(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
142 -$(INS.dir)
144 $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR)
145 $(INS.slink1)
148 # create directories in /usr/platform/ for the implementations that are
149 # defined in $(IMPLEMENTED_PLATFORM)
152 # Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
153 # that are linked to it.
155 $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
156 -$(INS.dir)
159 # create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
160 # to it's corresponding $(IMPLEMENTED_PLATFORM).
162 PLATFORMS = $(LINKED_PLATFORMS)
164 $(USR_PLAT_DIRS): $(USR_PLAT_DIR)
165 $(INS.slink3)
167 PLATFORMS += $(IMPLEMENTED_PLATFORM)
171 # Make the /platforms directories. This is hardwired here because
172 # the first stage of the project (KBI) only implements the userland
173 # changes, but the only reasonable place to record the aliases is
174 # here in kernel land.
177 install_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
178 $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
179 $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
180 $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
181 $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR) \
182 $(USR_STPAUL_DIR) $(USR_STPAUL_SBIN_DIR) \
183 $(USR_STPAUL_LIB_DIR) \
184 $(USR_GLENDALE_DIR) $(USR_GLENDALE_SBIN_DIR) \
185 $(USR_GLENDALE_LIB_DIR) \
186 $(USR_HURON_DIR) \
187 $(USR_HURON_SBIN_DIR) $(USR_HURON_LIB_DIR) \
188 $(USR_MARAMBA_DIR) $(USR_MARAMBA_SBIN_DIR) \
189 $(USR_MARAMBA_LIB_DIR) \
190 $(USR_THUNDER_DIR) $(USR_THUNDER_SBIN_DIR) \
191 $(USR_THUNDER_LIB_DIR) \
192 $(USR_TURGO_DIR) $(USR_TURGO_SBIN_DIR) \
193 $(USR_TURGO_LIB_DIR) \
194 $(USR_CONGO_DIR) $(USR_CONGO_SBIN_DIR) \
195 $(USR_CONGO_LIB_DIR) \
196 $(USR_MONZA_DIR) \
197 $(USR_MONZA_SBIN_DIR) $(USR_MONZA_SBIN_LINKS)
201 # rules for making include, sbin, lib dirs/links in
202 # /usr/platform/$(PLATFORM)/ for desktop platforms
204 $(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
205 $(INS.slink4)
207 $(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
208 $(INS.slink5)
210 $(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
211 -$(INS.dir)
213 $(USR_STPAUL_DIR): $(USR_SUN4V_PLAT_DIR)
214 -$(INS.dir)
216 $(USR_STPAUL_SBIN_DIR): $(USR_STPAUL_DIR)
217 $(INS.slink5)
219 $(USR_STPAUL_LIB_DIR): $(USR_STPAUL_DIR)
220 -$(INS.dir)
222 $(USR_HURON_DIR): $(USR_SUN4V_PLAT_DIR)
223 -$(INS.dir)
225 $(USR_HURON_SBIN_DIR): $(USR_HURON_DIR)
226 $(INS.slink5)
228 $(USR_HURON_LIB_DIR): $(USR_HURON_DIR)
229 -$(INS.dir)
231 $(USR_GLENDALE_DIR): $(USR_SUN4V_PLAT_DIR)
232 -$(INS.dir)
234 $(USR_GLENDALE_SBIN_DIR): $(USR_GLENDALE_DIR)
235 $(INS.slink5)
237 $(USR_GLENDALE_LIB_DIR): $(USR_GLENDALE_DIR)
238 -$(INS.dir)
240 $(USR_MARAMBA_DIR): $(USR_SUN4V_PLAT_DIR)
241 -$(INS.dir)
243 $(USR_MARAMBA_SBIN_DIR): $(USR_MARAMBA_DIR)
244 $(INS.slink5)
246 $(USR_MARAMBA_LIB_DIR): $(USR_MARAMBA_DIR)
247 -$(INS.dir)
249 $(USR_THUNDER_DIR): $(USR_SUN4V_PLAT_DIR)
250 -$(INS.dir)
252 $(USR_THUNDER_SBIN_DIR): $(USR_THUNDER_DIR)
253 $(INS.slink5)
255 $(USR_THUNDER_LIB_DIR): $(USR_THUNDER_DIR)
256 -$(INS.dir)
258 $(USR_TURGO_DIR): $(USR_SUN4V_PLAT_DIR)
259 -$(INS.dir)
261 $(USR_TURGO_SBIN_DIR): $(USR_TURGO_DIR)
262 $(INS.slink5)
264 $(USR_TURGO_LIB_DIR): $(USR_TURGO_DIR)
265 -$(INS.dir)
267 $(USR_CONGO_DIR): $(USR_SUN4V_PLAT_DIR)
268 -$(INS.dir)
270 $(USR_CONGO_SBIN_DIR): $(USR_CONGO_DIR)
271 $(INS.slink5)
273 $(USR_CONGO_LIB_DIR): $(USR_CONGO_DIR)
274 -$(INS.dir)
276 $(USR_MONZA_DIR): $(USR_SUN4V_PLAT_DIR)
277 -$(INS.dir)
279 $(USR_MONZA_SBIN_DIR): $(USR_MONZA_DIR)
280 -$(INS.dir)
282 $(USR_MONZA_SBIN_LINKS): $(USR_MONZA_SBIN_DIR)
283 $(INS.slink7)
286 # Full kernel lint target.
288 LINT_TARGET = globallint
290 globallint:
291 @-$(ECHO) "\nSUN4V KERNEL: global crosschecks:"
292 @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
294 lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
295 $(IMPLEMENTATIONS) $(LINT_CPU_KMODS)
297 include ../Makefile.targ
300 # Cross-reference customization: build a cross-reference over all of the
301 # sun4v-related directories.
303 XRDIRS = ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common
304 XRPRUNE = i86pc sun4u intel
306 cscope.out tags: FRC
307 $(XREF) -x $@