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]
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.
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
)
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
)
66 install := TARGET
= install
67 install_h
:= TARGET
= install_h
68 clean := TARGET
= clean
69 clobber := TARGET
= clobber
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
80 .PARALLEL
: $(PARALLEL_KMODS
) $(CLOSED_KMODS
) $(XMODS
) $(CLOSED_XMODS
) \
83 # Override for CPU_KMODS... they cannot be built
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
) \
94 # list the modules for Install -k sun4v.
95 modlist.karch
: modlist 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
)
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
)
114 @if
[ -f
$@
/Makefile
]; then \
115 cd
$@
; pwd
; $(MAKE
) $(NO_STATE
) $(TARGET
); \
121 @if
[ -f
$(CLOSED
)/uts
/sun4v
/$@
/Makefile
]; then \
122 cd
$(CLOSED
)/uts
/sun4v
/$@
; pwd
; \
123 $(MAKE
) $(NO_STATE
) $(TARGET
); \
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
)
144 $(LINKED_PLATFORMS
:%=$(ROOT_PLAT_DIR
)/%): $(ROOT_PLAT_DIR
)
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
)
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
)
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
) \
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
) \
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
)
207 $(USR_DESKTOP_SBIN_DIR
): $(USR_DESKTOP_DIR
)
210 $(USR_DESKTOP_LIB_DIR
): $(USR_DESKTOP_DIR
)
213 $(USR_STPAUL_DIR
): $(USR_SUN4V_PLAT_DIR
)
216 $(USR_STPAUL_SBIN_DIR
): $(USR_STPAUL_DIR
)
219 $(USR_STPAUL_LIB_DIR
): $(USR_STPAUL_DIR
)
222 $(USR_HURON_DIR
): $(USR_SUN4V_PLAT_DIR
)
225 $(USR_HURON_SBIN_DIR
): $(USR_HURON_DIR
)
228 $(USR_HURON_LIB_DIR
): $(USR_HURON_DIR
)
231 $(USR_GLENDALE_DIR
): $(USR_SUN4V_PLAT_DIR
)
234 $(USR_GLENDALE_SBIN_DIR
): $(USR_GLENDALE_DIR
)
237 $(USR_GLENDALE_LIB_DIR
): $(USR_GLENDALE_DIR
)
240 $(USR_MARAMBA_DIR
): $(USR_SUN4V_PLAT_DIR
)
243 $(USR_MARAMBA_SBIN_DIR
): $(USR_MARAMBA_DIR
)
246 $(USR_MARAMBA_LIB_DIR
): $(USR_MARAMBA_DIR
)
249 $(USR_THUNDER_DIR
): $(USR_SUN4V_PLAT_DIR
)
252 $(USR_THUNDER_SBIN_DIR
): $(USR_THUNDER_DIR
)
255 $(USR_THUNDER_LIB_DIR
): $(USR_THUNDER_DIR
)
258 $(USR_TURGO_DIR
): $(USR_SUN4V_PLAT_DIR
)
261 $(USR_TURGO_SBIN_DIR
): $(USR_TURGO_DIR
)
264 $(USR_TURGO_LIB_DIR
): $(USR_TURGO_DIR
)
267 $(USR_CONGO_DIR
): $(USR_SUN4V_PLAT_DIR
)
270 $(USR_CONGO_SBIN_DIR
): $(USR_CONGO_DIR
)
273 $(USR_CONGO_LIB_DIR
): $(USR_CONGO_DIR
)
276 $(USR_MONZA_DIR
): $(USR_SUN4V_PLAT_DIR
)
279 $(USR_MONZA_SBIN_DIR
): $(USR_MONZA_DIR
)
282 $(USR_MONZA_SBIN_LINKS
): $(USR_MONZA_SBIN_DIR
)
286 # Full kernel lint target.
288 LINT_TARGET
= 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