xref: /illumos-gate/usr/src/uts/sun4v/Makefile (revision 56ffda17)
1 #
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#	This makefile drives the production of all implementation architecture
26#	dependent modules for the sun4v architecture.
27#
28
29UTSBASE = ..
30
31include Makefile.sun4v
32include Makefile.stpaul
33include Makefile.huron
34include Makefile.maramba
35include Makefile.thunder
36include Makefile.turgo
37include Makefile.congo
38include Makefile.monza
39
40USR_GLENDALE_DIR	= $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320
41USR_GLENDALE_SBIN_DIR	= $(USR_GLENDALE_DIR)/sbin
42USR_GLENDALE_LIB_DIR	= $(USR_GLENDALE_DIR)/lib
43
44def		:=	TARGET= def
45all		:=	TARGET= all
46install		:=	TARGET= install
47install_h	:=	TARGET= install_h
48clean		:=	TARGET= clean
49clobber		:=	TARGET= clobber
50modlist		:=	TARGET= modlist
51modlist	modlist.sparc :=	NO_STATE= -K $$MODSTATE$$$$
52check		:=	TARGET= check
53
54.KEEP_STATE:
55
56.PARALLEL:	$(PARALLEL_KMODS) $(XMODS) modlist modlist.sparc
57
58# Override for CPU_KMODS... they cannot be built
59# in parallel
60.NO_PARALLEL:	$(CPU_KMODS)
61
62def all clean clobber: genassym unix .WAIT \
63	$(KMODS) $(XMODS) $(IMPLEMENTATIONS)
64
65# list the modules under sun4v.
66modlist: unix $(KMODS) $(XMODS) $(IMPLEMENTATIONS)
67
68# list the modules for Install -k sun4v.
69modlist.karch: modlist modlist.sparc
70
71modlist.sparc:
72	@cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
73
74install: install_platforms genassym unix .WAIT $(KMODS) \
75	$(XMODS) $(IMPLEMENTATIONS)
76
77genassym unix $(KMODS):	FRC
78	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
79
80$(IMPLEMENTATIONS):	FRC
81	@cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
82
83$(XMODS):	FRC
84	cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
85
86install_h check:	install_platforms $(IMPLEMENTATIONS) FRC
87	@cd sys; pwd; $(MAKE) $(TARGET)
88	@cd vm; pwd; $(MAKE) $(TARGET)
89
90#
91# Rules for the /platforms directories.  This is hardwired here because
92# the first stage of the project (KBI) only implements the userland
93# changes, but the only reasonable place to record the aliases is
94# here in kernel land.
95#
96$(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
97	-$(INS.dir)
98
99$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR)
100	$(INS.slink1)
101
102#
103# create directories in /usr/platform/ for the implementations that are
104# defined in $(IMPLEMENTED_PLATFORM)
105#
106
107# Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
108# that are linked to it.
109#
110$(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM):	$(USR_PLAT_DIR)
111	-$(INS.dir)
112
113#
114# create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
115# to it's corresponding $(IMPLEMENTED_PLATFORM).
116#
117PLATFORMS	= $(LINKED_PLATFORMS)
118
119$(USR_PLAT_DIRS): $(USR_PLAT_DIR)
120	$(INS.slink3)
121
122PLATFORMS	+= $(IMPLEMENTED_PLATFORM)
123
124
125#
126# Make the /platforms directories.  This is hardwired here because
127# the first stage of the project (KBI) only implements the userland
128# changes, but the only reasonable place to record the aliases is
129# here in kernel land.
130#
131
132install_platforms:	$(ROOT_PSM_DIR) $(USR_PSM_DIR) \
133			$(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
134			$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
135			$(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
136			$(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR) \
137			$(USR_STPAUL_DIR) $(USR_STPAUL_SBIN_DIR) \
138			$(USR_STPAUL_LIB_DIR) \
139			$(USR_GLENDALE_DIR) $(USR_GLENDALE_SBIN_DIR) \
140			$(USR_GLENDALE_LIB_DIR) \
141			$(USR_HURON_DIR) \
142			$(USR_HURON_SBIN_DIR) $(USR_HURON_LIB_DIR) \
143			$(USR_MARAMBA_DIR) $(USR_MARAMBA_SBIN_DIR) \
144			$(USR_MARAMBA_LIB_DIR) \
145			$(USR_THUNDER_DIR) $(USR_THUNDER_SBIN_DIR) \
146			$(USR_THUNDER_LIB_DIR) \
147			$(USR_TURGO_DIR) $(USR_TURGO_SBIN_DIR) \
148			$(USR_TURGO_LIB_DIR) \
149			$(USR_CONGO_DIR) $(USR_CONGO_SBIN_DIR) \
150			$(USR_CONGO_LIB_DIR) \
151			$(USR_MONZA_DIR) \
152			$(USR_MONZA_SBIN_DIR) $(USR_MONZA_SBIN_LINKS)
153
154
155#
156# rules for making include, sbin, lib dirs/links in
157# /usr/platform/$(PLATFORM)/ for desktop platforms
158#
159$(USR_DESKTOP_INC_DIR):		$(USR_DESKTOP_DIR)
160	$(INS.slink4)
161
162$(USR_DESKTOP_SBIN_DIR):	$(USR_DESKTOP_DIR)
163	$(INS.slink5)
164
165$(USR_DESKTOP_LIB_DIR):		$(USR_DESKTOP_DIR)
166	-$(INS.dir)
167
168$(USR_STPAUL_DIR):		$(USR_SUN4V_PLAT_DIR)
169	-$(INS.dir)
170
171$(USR_STPAUL_SBIN_DIR):		$(USR_STPAUL_DIR)
172	$(INS.slink5)
173
174$(USR_STPAUL_LIB_DIR):		$(USR_STPAUL_DIR)
175	-$(INS.dir)
176
177$(USR_HURON_DIR):		$(USR_SUN4V_PLAT_DIR)
178	-$(INS.dir)
179
180$(USR_HURON_SBIN_DIR):		$(USR_HURON_DIR)
181	$(INS.slink5)
182
183$(USR_HURON_LIB_DIR):		$(USR_HURON_DIR)
184	-$(INS.dir)
185
186$(USR_GLENDALE_DIR):		$(USR_SUN4V_PLAT_DIR)
187	-$(INS.dir)
188
189$(USR_GLENDALE_SBIN_DIR):		$(USR_GLENDALE_DIR)
190	$(INS.slink5)
191
192$(USR_GLENDALE_LIB_DIR):		$(USR_GLENDALE_DIR)
193	-$(INS.dir)
194
195$(USR_MARAMBA_DIR):		$(USR_SUN4V_PLAT_DIR)
196	-$(INS.dir)
197
198$(USR_MARAMBA_SBIN_DIR):	$(USR_MARAMBA_DIR)
199	$(INS.slink5)
200
201$(USR_MARAMBA_LIB_DIR):		$(USR_MARAMBA_DIR)
202	-$(INS.dir)
203
204$(USR_THUNDER_DIR):		$(USR_SUN4V_PLAT_DIR)
205	-$(INS.dir)
206
207$(USR_THUNDER_SBIN_DIR):	$(USR_THUNDER_DIR)
208	$(INS.slink5)
209
210$(USR_THUNDER_LIB_DIR):		$(USR_THUNDER_DIR)
211	-$(INS.dir)
212
213$(USR_TURGO_DIR):		$(USR_SUN4V_PLAT_DIR)
214	-$(INS.dir)
215
216$(USR_TURGO_SBIN_DIR):		$(USR_TURGO_DIR)
217	$(INS.slink5)
218
219$(USR_TURGO_LIB_DIR):		$(USR_TURGO_DIR)
220	-$(INS.dir)
221
222$(USR_CONGO_DIR):		$(USR_SUN4V_PLAT_DIR)
223	-$(INS.dir)
224
225$(USR_CONGO_SBIN_DIR):		$(USR_CONGO_DIR)
226	$(INS.slink5)
227
228$(USR_CONGO_LIB_DIR):		$(USR_CONGO_DIR)
229	-$(INS.dir)
230
231$(USR_MONZA_DIR):		$(USR_SUN4V_PLAT_DIR)
232	-$(INS.dir)
233
234$(USR_MONZA_SBIN_DIR):		$(USR_MONZA_DIR)
235	-$(INS.dir)
236
237$(USR_MONZA_SBIN_LINKS):	$(USR_MONZA_SBIN_DIR)
238	$(INS.slink7)
239
240include ../Makefile.targ
241
242#
243# Cross-reference customization: build a cross-reference over all of the
244# sun4v-related directories.
245#
246XRDIRS	= ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common
247XRPRUNE = i86pc sun4u intel
248
249cscope.out tags: FRC
250	$(XREF) -x $@
251