xref: /titanic_41/usr/src/uts/sun4u/Makefile.rules (revision 505d05c73a6e56769f263d4803b22eddd168ee24)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28#	This Makefile defines the build rules for the directory uts/sun4u
29#	and its children. These are the source files which sun4u
30#	"implementation architecture" dependent.
31#
32#	The following two-level ordering must be maintained in this file.
33#	  Lines are sorted first in order of decreasing specificity based on
34#	  the first directory component.  That is, sun4u rules come before
35#	  sparc rules come before common rules.
36#
37#	  Lines whose initial directory components are equal are sorted
38#	  alphabetically by the remaining components.
39
40#
41#	Section 1a: C object build rules
42#
43$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/cpu/%.c
44	$(COMPILE.c) -o $@ $<
45	$(CTFCONVERT_O)
46
47$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/cpu/%.s
48	$(COMPILE.s) -o $@ $<
49
50$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/ppm/%.c
51	$(COMPILE.c) -o $@ $<
52	$(CTFCONVERT_O)
53
54$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/%.c
55	$(COMPILE.c) -o $@ $<
56	$(CTFCONVERT_O)
57
58$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
59	$(COMPILE.c) -o $@ $<
60	$(CTFCONVERT_O)
61
62$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
63	$(COMPILE.c) -o $@ $<
64	$(CTFCONVERT_O)
65
66$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
67	$(COMPILE.c) -o $@ $<
68	$(CTFCONVERT_O)
69
70$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/memtest/%.c
71	$(COMPILE.c) -o $@ $<
72	$(CTFCONVERT_O)
73
74$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4/io/memtest/%.c
75	$(COMPILE.c) -o $@ $<
76	$(CTFCONVERT_O)
77
78$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/memtest/%.s
79	$(COMPILE.s) -o $@ $<
80
81$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4/io/memtest/%.s
82	$(COMPILE.s) -o $@ $<
83
84$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.c
85	$(COMPILE.c) -o $@ $<
86	$(CTFCONVERT_O)
87
88$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.s
89	$(COMPILE.s) -o $@ $<
90
91$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.c
92	$(COMPILE.c) -o $@ $<
93	$(CTFCONVERT_O)
94
95$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.s
96	$(COMPILE.s) -o $@ $<
97
98$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/wrsm/%.c
99	$(COMPILE.c) -o $@ $<
100	$(CTFCONVERT_O)
101
102$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/wrsm/%.s
103	$(COMPILE.s) -o $@ $<
104
105$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/dmfe/%.c
106	$(COMPILE.c) -o $@ $<
107	$(CTFCONVERT_O)
108
109$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/ctsmc/%.c
110	$(COMPILE.c) -o $@ $<
111	$(CTFCONVERT_O)
112
113$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/ml/%.s
114	$(COMPILE.s) -o $@ $<
115
116$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/os/%.c
117	$(COMPILE.c) -o $@ $<
118	$(CTFCONVERT_O)
119
120$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/pcbe/%.c
121	$(COMPILE.c) -o $@ $<
122	$(CTFCONVERT_O)
123
124$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.c
125	$(COMPILE.c) -o $@ $<
126	$(CTFCONVERT_O)
127
128$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.s
129	$(COMPILE.s) -o $@ $<
130
131$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
132	$(COMPILE.s) -o $@ $<
133
134$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
135	$(COMPILE.c) -o $@ $<
136	$(CTFCONVERT_O)
137
138$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
139	$(COMPILE.c) -o $@ $<
140	$(CTFCONVERT_O)
141
142$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
143	$(COMPILE.c) -o $@ $<
144	$(CTFCONVERT_O)
145
146$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/aes/%.c
147	$(COMPILE.c) -o $@ $<
148	$(CTFCONVERT_O)
149
150$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/%.c
151	$(COMPILE.c) -o $@ $<
152	$(CTFCONVERT_O)
153
154$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/des/%.c
155	$(COMPILE.c) -o $@ $<
156	$(CTFCONVERT_O)
157
158$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/aes/sun4u/%.s
159	$(COMPILE.s) -o $@ $<
160
161$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4u/%.s
162	$(COMPILE.s) -o $@ $<
163
164$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/des/sun4u/%.s
165	$(COMPILE.s) -o $@ $<
166
167$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
168	$(COMPILE.s) -o $@ $<
169
170$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/rsa/%.s
171	$(COMPILE.s) -o $@ $<
172
173$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
174	$(COMPILE.s) -o $@ $<
175
176KMECHKRB5_BASE=$(UTSBASE)/common/gssapi/mechs/krb5
177
178$(OBJS_DIR)/%.o:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.c
179	$(COMPILE.c) -o $@ $<
180	$(CTFCONVERT_O)
181
182$(OBJS_DIR)/%.o:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.s
183	$(COMPILE.s) -o $@ $<
184
185$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
186	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
187	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
188	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
189
190$(DTRACESTUBS):	$(DTRACESTUBS_O)
191	$(BUILD.SO) $(DTRACESTUBS_O)
192
193#
194#	Section 1b: Lint `object' build rules
195#
196$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.c
197	@($(LHEAD) $(LINT.c) $< $(LTAIL))
198
199$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.s
200	@($(LHEAD) $(LINT.s) $< $(LTAIL))
201
202$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/ppm/%.c
203	@($(LHEAD) $(LINT.c) $< $(LTAIL))
204
205$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/%.c
206	@($(LHEAD) $(LINT.c) $< $(LTAIL))
207
208$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
209	@($(LHEAD) $(LINT.c) $< $(LTAIL))
210
211$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
212	@($(LHEAD) $(LINT.c) $< $(LTAIL))
213
214$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
215	@($(LHEAD) $(LINT.c) $< $(LTAIL))
216
217$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/memtest/%.c
218	@($(LHEAD) $(LINT.c) $< $(LTAIL))
219
220$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/io/memtest/%.c
221	@($(LHEAD) $(LINT.c) $< $(LTAIL))
222
223$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/memtest/%.s
224	@($(LHEAD) $(LINT.s) $< $(LTAIL))
225
226$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/io/memtest/%.s
227	@($(LHEAD) $(LINT.s) $< $(LTAIL))
228
229$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.c
230	@($(LHEAD) $(LINT.c) $< $(LTAIL))
231
232$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.s
233	@($(LHEAD) $(LINT.s) $< $(LTAIL))
234
235$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.c
236	@($(LHEAD) $(LINT.c) $< $(LTAIL))
237
238$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.s
239	@($(LHEAD) $(LINT.s) $< $(LTAIL))
240
241$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/wrsm/%.c
242	@($(LHEAD) $(LINT.c) $< $(LTAIL))
243
244$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/wrsm/%.s
245	@($(LHEAD) $(LINT.s) $< $(LTAIL))
246
247$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/dmfe/%.c
248	@($(LHEAD) $(LINT.c) $< $(LTAIL))
249
250$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/ctsmc/%.c
251	@($(LHEAD) $(LINT.c) $< $(LTAIL))
252
253$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/ml/%.s
254	@($(LHEAD) $(LINT.s) $< $(LTAIL))
255
256$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/os/%.c
257	@($(LHEAD) $(LINT.c) $< $(LTAIL))
258
259$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/pcbe/%.c
260	@($(LHEAD) $(LINT.c) $< $(LTAIL))
261
262$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.c
263	@($(LHEAD) $(LINT.c) $< $(LTAIL))
264
265$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.s
266	@($(LHEAD) $(LINT.s) $< $(LTAIL))
267
268$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
269	@($(LHEAD) $(LINT.s) $< $(LTAIL))
270
271$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
272	@($(LHEAD) $(LINT.c) $< $(LTAIL))
273
274$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
275	@($(LHEAD) $(LINT.c) $< $(LTAIL))
276
277$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
278	@($(LHEAD) $(LINT.c) $< $(LTAIL))
279
280$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/%.c
281	@($(LHEAD) $(LINT.c) $< $(LTAIL))
282
283$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/%.c
284	@($(LHEAD) $(LINT.c) $< $(LTAIL))
285
286$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/%.c
287	@($(LHEAD) $(LINT.c) $< $(LTAIL))
288
289$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/sun4u/%.s
290	@($(LHEAD) $(LINT.s) $< $(LTAIL))
291
292$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/sun4u/%.s
293	@($(LHEAD) $(LINT.s) $< $(LTAIL))
294
295$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/sun4u/%.s
296	@($(LHEAD) $(LINT.s) $< $(LTAIL))
297
298$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
299	@($(LHEAD) $(LINT.s) $< $(LTAIL))
300
301$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/rsa/%.s
302	@($(LHEAD) $(LINT.s) $< $(LTAIL))
303
304$(LINTS_DIR)/%.ln:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.c
305	@($(LHEAD) $(LINT.c) $< $(LTAIL))
306
307$(LINTS_DIR)/%.ln:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.s
308	@($(LHEAD) $(LINT.s) $< $(LTAIL))
309
310$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
311	@($(LHEAD) $(LINT.c) $< $(LTAIL))
312