xref: /titanic_41/usr/src/uts/sun4v/Makefile.rules (revision 1f0f5e3e328e41529296f756090856aa7f239b1c)
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#
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#	This Makefile defines the build rules for the directory uts/sun4v
27#	and its children. These are the source files which sun4v
28#	"implementation architecture" dependent.
29#
30#	The following two-level ordering must be maintained in this file.
31#	  Lines are sorted first in order of decreasing specificity based on
32#	  the first directory component.  That is, sun4v rules come before
33#	  sparc rules come before common rules.
34#
35#	  Lines whose initial directory components are equal are sorted
36#	  alphabetically by the remaining components.
37
38#
39#	Section 1a: C object build rules
40#
41$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/cpu/%.c
42	$(COMPILE.c) -o $@ $<
43	$(CTFCONVERT_O)
44
45$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/cpu/%.s
46	$(COMPILE.s) -o $@ $<
47
48$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/%.c
49	$(COMPILE.c) -o $@ $<
50	$(CTFCONVERT_O)
51
52$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/ml/%.s
53	$(COMPILE.s) -o $@ $<
54
55$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/os/%.c
56	$(COMPILE.c) -o $@ $<
57	$(CTFCONVERT_O)
58
59$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/pcbe/%.c
60	$(COMPILE.c) -o $@ $<
61	$(CTFCONVERT_O)
62
63$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4/brand/sn1/%.s
64	$(COMPILE.s) -o $@ $<
65
66$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4/brand/solaris10/%.s
67	$(COMPILE.s) -o $@ $<
68
69$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/promif/%.c
70	$(COMPILE.c) -o $@ $<
71	$(CTFCONVERT_O)
72
73$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/px/%.c
74	$(COMPILE.c) -o $@ $<
75	$(CTFCONVERT_O)
76
77$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/px/%.s
78	$(COMPILE.s) -o $@ $<
79
80$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/fpc/%.c
81	$(COMPILE.c) -o $@ $<
82	$(CTFCONVERT_O)
83
84$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/fpc/%.s
85	$(COMPILE.s) -o $@ $<
86
87$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2piupc/%.c
88	$(COMPILE.c) -o $@ $<
89	$(CTFCONVERT_O)
90
91$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2piupc/%.s
92	$(COMPILE.s) -o $@ $<
93
94$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/iospc/%.c
95	$(COMPILE.c) -o $@ $<
96	$(CTFCONVERT_O)
97
98$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/iospc/%.s
99	$(COMPILE.s) -o $@ $<
100
101$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/glvc/%.c
102	$(COMPILE.c) -o $@ $<
103	$(CTFCONVERT_O)
104
105$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/glvc/%.s
106	$(COMPILE.s) -o $@ $<
107
108$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/pciex/%.c
109	$(COMPILE.c) -o $@ $<
110	$(CTFCONVERT_O)
111
112$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/pciex/%.s
113	$(COMPILE.s) -o $@ $<
114
115$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.c
116	$(COMPILE.c) -o $@ $<
117	$(CTFCONVERT_O)
118
119$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.s
120	$(COMPILE.s) -o $@ $<
121
122$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
123	$(COMPILE.s) -o $@ $<
124
125$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
126	$(COMPILE.c) -o $@ $<
127	$(CTFCONVERT_O)
128
129$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
130	$(COMPILE.c) -o $@ $<
131	$(CTFCONVERT_O)
132
133$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
134	$(COMPILE.c) -o $@ $<
135	$(CTFCONVERT_O)
136
137$(OBJS_DIR)/%.o:		$(SRC)/common/mdesc/%.c
138	$(COMPILE.c) -o $@ $<
139	$(CTFCONVERT_O)
140
141$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/niumx/%.c
142	$(COMPILE.c) -o $@ $<
143	$(CTFCONVERT_O)
144
145$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2rng/%.c
146	$(COMPILE.c) -o $@ $<
147	$(CTFCONVERT_O)
148
149$(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/%.s
150	$(COMPILE.s) -o $@ $<
151
152$(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/n2rng/%.s
153	$(COMPILE.s) -o $@ $<
154
155$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
156	$(COMPILE.s) -o $@ $<
157
158$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4v/%.c
159	$(COMPILE.c) -o $@ $<
160	$(CTFCONVERT_O)
161
162$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
163	$(NM) -u $(UNIX_O) $(LIBS) | $(GREP) __dtrace_probe_ | $(SORT) | \
164	    $(UNIQ) | $(NAWK) '{ \
165	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
166	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
167
168$(DTRACESTUBS):	$(DTRACESTUBS_O)
169	$(BUILD.SO) $(DTRACESTUBS_O)
170
171#
172#	Section 1b: Lint `object' build rules
173#
174$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.c
175	@($(LHEAD) $(LINT.c) $< $(LTAIL))
176
177$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.s
178	@($(LHEAD) $(LINT.s) $< $(LTAIL))
179
180$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/%.c
181	@($(LHEAD) $(LINT.c) $< $(LTAIL))
182
183$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/%.s
184	@($(LHEAD) $(LINT.s) $< $(LTAIL))
185
186$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.c
187	@($(LHEAD) $(LINT.c) $< $(LTAIL))
188
189$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.s
190	@($(LHEAD) $(LINT.s) $< $(LTAIL))
191
192$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/niumx/%.c
193	@($(LHEAD) $(LINT.c) $< $(LTAIL))
194
195$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.c
196	@($(LHEAD) $(LINT.c) $< $(LTAIL))
197
198$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.s
199	@($(LHEAD) $(LINT.s) $< $(LTAIL))
200
201$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2piupc/%.c
202	@($(LHEAD) $(LINT.c) $< $(LTAIL))
203
204$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2piupc/%.s
205	@($(LHEAD) $(LINT.s) $< $(LTAIL))
206
207$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/iospc/%.c
208	@($(LHEAD) $(LINT.c) $< $(LTAIL))
209
210$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/iospc/%.s
211	@($(LHEAD) $(LINT.s) $< $(LTAIL))
212
213$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.c
214	@($(LHEAD) $(LINT.c) $< $(LTAIL))
215
216$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.s
217	@($(LHEAD) $(LINT.s) $< $(LTAIL))
218
219$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2rng/%.c
220	@($(LHEAD) $(LINT.c) $< $(LTAIL))
221
222$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2rng/%.s
223	@($(LHEAD) $(LINT.s) $< $(LTAIL))
224
225$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/pciex/%.c
226	@($(LHEAD) $(LINT.c) $< $(LTAIL))
227
228$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/pciex/%.s
229	@($(LHEAD) $(LINT.s) $< $(LTAIL))
230
231$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/ml/%.s
232	@($(LHEAD) $(LINT.s) $< $(LTAIL))
233
234$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/os/%.c
235	@($(LHEAD) $(LINT.c) $< $(LTAIL))
236
237$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/pcbe/%.c
238	@($(LHEAD) $(LINT.c) $< $(LTAIL))
239
240$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/brand/sn1/%.s
241	@($(LHEAD) $(LINT.s) $< $(LTAIL))
242
243$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/brand/solaris10/%.s
244	@($(LHEAD) $(LINT.s) $< $(LTAIL))
245
246$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/promif/%.c
247	@($(LHEAD) $(LINT.c) $< $(LTAIL))
248
249$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.c
250	@($(LHEAD) $(LINT.c) $< $(LTAIL))
251
252$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.s
253	@($(LHEAD) $(LINT.s) $< $(LTAIL))
254
255$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
256	@($(LHEAD) $(LINT.s) $< $(LTAIL))
257
258$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
259	@($(LHEAD) $(LINT.c) $< $(LTAIL))
260
261$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
262	@($(LHEAD) $(LINT.c) $< $(LTAIL))
263
264$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
265	@($(LHEAD) $(LINT.c) $< $(LTAIL))
266
267$(LINTS_DIR)/%.ln:		$(SRC)/common/mdesc/%.c
268	@($(LHEAD) $(LINT.c) $< $(LTAIL))
269
270$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
271	@($(LHEAD) $(LINT.c) $< $(LTAIL))
272