xref: /titanic_52/usr/src/uts/sun4v/Makefile.rules (revision 121d13daefbeb0546d0d9c6ef16c753aa6890290)
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/glvc/%.c
95	$(COMPILE.c) -o $@ $<
96	$(CTFCONVERT_O)
97
98$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/glvc/%.s
99	$(COMPILE.s) -o $@ $<
100
101$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/pciex/%.c
102	$(COMPILE.c) -o $@ $<
103	$(CTFCONVERT_O)
104
105$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/pciex/%.s
106	$(COMPILE.s) -o $@ $<
107
108$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.c
109	$(COMPILE.c) -o $@ $<
110	$(CTFCONVERT_O)
111
112$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.s
113	$(COMPILE.s) -o $@ $<
114
115$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
116	$(COMPILE.s) -o $@ $<
117
118$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
119	$(COMPILE.c) -o $@ $<
120	$(CTFCONVERT_O)
121
122$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
123	$(COMPILE.c) -o $@ $<
124	$(CTFCONVERT_O)
125
126$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
127	$(COMPILE.c) -o $@ $<
128	$(CTFCONVERT_O)
129
130$(OBJS_DIR)/%.o:		$(SRC)/common/mdesc/%.c
131	$(COMPILE.c) -o $@ $<
132	$(CTFCONVERT_O)
133
134$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/niumx/%.c
135	$(COMPILE.c) -o $@ $<
136	$(CTFCONVERT_O)
137
138$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2rng/%.c
139	$(COMPILE.c) -o $@ $<
140	$(CTFCONVERT_O)
141
142$(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/%.s
143	$(COMPILE.s) -o $@ $<
144
145$(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/n2rng/%.s
146	$(COMPILE.s) -o $@ $<
147
148$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
149	$(COMPILE.s) -o $@ $<
150
151$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4v/%.c
152	$(COMPILE.c) -o $@ $<
153	$(CTFCONVERT_O)
154
155$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
156	$(NM) -u $(UNIX_O) $(LIBS) | $(GREP) __dtrace_probe_ | $(SORT) | \
157	    $(UNIQ) | $(NAWK) '{ \
158	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
159	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
160
161$(DTRACESTUBS):	$(DTRACESTUBS_O)
162	$(BUILD.SO) $(DTRACESTUBS_O)
163
164#
165#	Section 1b: Lint `object' build rules
166#
167$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.c
168	@($(LHEAD) $(LINT.c) $< $(LTAIL))
169
170$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.s
171	@($(LHEAD) $(LINT.s) $< $(LTAIL))
172
173$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/%.c
174	@($(LHEAD) $(LINT.c) $< $(LTAIL))
175
176$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/%.s
177	@($(LHEAD) $(LINT.s) $< $(LTAIL))
178
179$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.c
180	@($(LHEAD) $(LINT.c) $< $(LTAIL))
181
182$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.s
183	@($(LHEAD) $(LINT.s) $< $(LTAIL))
184
185$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/niumx/%.c
186	@($(LHEAD) $(LINT.c) $< $(LTAIL))
187
188$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.c
189	@($(LHEAD) $(LINT.c) $< $(LTAIL))
190
191$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.s
192	@($(LHEAD) $(LINT.s) $< $(LTAIL))
193
194$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2piupc/%.c
195	@($(LHEAD) $(LINT.c) $< $(LTAIL))
196
197$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2piupc/%.s
198	@($(LHEAD) $(LINT.s) $< $(LTAIL))
199
200$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.c
201	@($(LHEAD) $(LINT.c) $< $(LTAIL))
202
203$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.s
204	@($(LHEAD) $(LINT.s) $< $(LTAIL))
205
206$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2rng/%.c
207	@($(LHEAD) $(LINT.c) $< $(LTAIL))
208
209$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2rng/%.s
210	@($(LHEAD) $(LINT.s) $< $(LTAIL))
211
212$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/pciex/%.c
213	@($(LHEAD) $(LINT.c) $< $(LTAIL))
214
215$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/pciex/%.s
216	@($(LHEAD) $(LINT.s) $< $(LTAIL))
217
218$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/ml/%.s
219	@($(LHEAD) $(LINT.s) $< $(LTAIL))
220
221$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/os/%.c
222	@($(LHEAD) $(LINT.c) $< $(LTAIL))
223
224$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/pcbe/%.c
225	@($(LHEAD) $(LINT.c) $< $(LTAIL))
226
227$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/brand/sn1/%.s
228	@($(LHEAD) $(LINT.s) $< $(LTAIL))
229
230$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/brand/solaris10/%.s
231	@($(LHEAD) $(LINT.s) $< $(LTAIL))
232
233$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/promif/%.c
234	@($(LHEAD) $(LINT.c) $< $(LTAIL))
235
236$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.c
237	@($(LHEAD) $(LINT.c) $< $(LTAIL))
238
239$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.s
240	@($(LHEAD) $(LINT.s) $< $(LTAIL))
241
242$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
243	@($(LHEAD) $(LINT.s) $< $(LTAIL))
244
245$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
246	@($(LHEAD) $(LINT.c) $< $(LTAIL))
247
248$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
249	@($(LHEAD) $(LINT.c) $< $(LTAIL))
250
251$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
252	@($(LHEAD) $(LINT.c) $< $(LTAIL))
253
254$(LINTS_DIR)/%.ln:		$(SRC)/common/mdesc/%.c
255	@($(LHEAD) $(LINT.c) $< $(LTAIL))
256
257$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
258	@($(LHEAD) $(LINT.c) $< $(LTAIL))
259