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