xref: /titanic_51/usr/src/uts/sun4u/Makefile.rules (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
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)/sun4u/io/memtest/%.s
75	$(COMPILE.s) -o $@ $<
76
77$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.c
78	$(COMPILE.c) -o $@ $<
79	$(CTFCONVERT_O)
80
81$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.s
82	$(COMPILE.s) -o $@ $<
83
84$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.c
85	$(COMPILE.c) -o $@ $<
86	$(CTFCONVERT_O)
87
88$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.s
89	$(COMPILE.s) -o $@ $<
90
91$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/wrsm/%.c
92	$(COMPILE.c) -o $@ $<
93	$(CTFCONVERT_O)
94
95$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/wrsm/%.s
96	$(COMPILE.s) -o $@ $<
97
98$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/dmfe/%.c
99	$(COMPILE.c) -o $@ $<
100	$(CTFCONVERT_O)
101
102$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/ctsmc/%.c
103	$(COMPILE.c) -o $@ $<
104	$(CTFCONVERT_O)
105
106$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/ml/%.s
107	$(COMPILE.s) -o $@ $<
108
109$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/os/%.c
110	$(COMPILE.c) -o $@ $<
111	$(CTFCONVERT_O)
112
113$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/pcbe/%.c
114	$(COMPILE.c) -o $@ $<
115	$(CTFCONVERT_O)
116
117$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.c
118	$(COMPILE.c) -o $@ $<
119	$(CTFCONVERT_O)
120
121$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.s
122	$(COMPILE.s) -o $@ $<
123
124$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
125	$(COMPILE.s) -o $@ $<
126
127$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
128	$(COMPILE.c) -o $@ $<
129	$(CTFCONVERT_O)
130
131$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
132	$(COMPILE.c) -o $@ $<
133	$(CTFCONVERT_O)
134
135$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
136	$(COMPILE.c) -o $@ $<
137	$(CTFCONVERT_O)
138
139$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/aes/%.c
140	$(COMPILE.c) -o $@ $<
141	$(CTFCONVERT_O)
142
143$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/%.c
144	$(COMPILE.c) -o $@ $<
145	$(CTFCONVERT_O)
146
147$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/des/%.c
148	$(COMPILE.c) -o $@ $<
149	$(CTFCONVERT_O)
150
151$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/aes/sun4u/%.s
152	$(COMPILE.s) -o $@ $<
153
154$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4u/%.s
155	$(COMPILE.s) -o $@ $<
156
157$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/des/sun4u/%.s
158	$(COMPILE.s) -o $@ $<
159
160$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
161	$(COMPILE.s) -o $@ $<
162
163$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/rsa/%.s
164	$(COMPILE.s) -o $@ $<
165
166$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
167	$(COMPILE.s) -o $@ $<
168
169KMECHKRB5_BASE=$(UTSBASE)/common/gssapi/mechs/krb5
170
171$(OBJS_DIR)/%.o:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.c
172	$(COMPILE.c) -o $@ $<
173	$(CTFCONVERT_O)
174
175$(OBJS_DIR)/%.o:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.s
176	$(COMPILE.s) -o $@ $<
177
178$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
179	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
180	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
181	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
182
183$(DTRACESTUBS):	$(DTRACESTUBS_O)
184	$(LD) -o $@ -G -h dtracestubs $(DTRACESTUBS_O)
185
186#
187#	Section 1b: Lint `object' build rules
188#
189$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.c
190	@($(LHEAD) $(LINT.c) $< $(LTAIL))
191
192$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.s
193	@($(LHEAD) $(LINT.s) $< $(LTAIL))
194
195$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/ppm/%.c
196	@($(LHEAD) $(LINT.c) $< $(LTAIL))
197
198$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/%.c
199	@($(LHEAD) $(LINT.c) $< $(LTAIL))
200
201$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
202	@($(LHEAD) $(LINT.c) $< $(LTAIL))
203
204$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
205	@($(LHEAD) $(LINT.c) $< $(LTAIL))
206
207$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
208	@($(LHEAD) $(LINT.c) $< $(LTAIL))
209
210$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/memtest/%.c
211	@($(LHEAD) $(LINT.c) $< $(LTAIL))
212
213$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/memtest/%.s
214	@($(LHEAD) $(LINT.s) $< $(LTAIL))
215
216$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.c
217	@($(LHEAD) $(LINT.c) $< $(LTAIL))
218
219$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.s
220	@($(LHEAD) $(LINT.s) $< $(LTAIL))
221
222$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.c
223	@($(LHEAD) $(LINT.c) $< $(LTAIL))
224
225$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.s
226	@($(LHEAD) $(LINT.s) $< $(LTAIL))
227
228$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/wrsm/%.c
229	@($(LHEAD) $(LINT.c) $< $(LTAIL))
230
231$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/wrsm/%.s
232	@($(LHEAD) $(LINT.s) $< $(LTAIL))
233
234$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/dmfe/%.c
235	@($(LHEAD) $(LINT.c) $< $(LTAIL))
236
237$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/ctsmc/%.c
238	@($(LHEAD) $(LINT.c) $< $(LTAIL))
239
240$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/ml/%.s
241	@($(LHEAD) $(LINT.s) $< $(LTAIL))
242
243$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/os/%.c
244	@($(LHEAD) $(LINT.c) $< $(LTAIL))
245
246$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/pcbe/%.c
247	@($(LHEAD) $(LINT.c) $< $(LTAIL))
248
249$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.c
250	@($(LHEAD) $(LINT.c) $< $(LTAIL))
251
252$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/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/crypto/aes/%.c
268	@($(LHEAD) $(LINT.c) $< $(LTAIL))
269
270$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/%.c
271	@($(LHEAD) $(LINT.c) $< $(LTAIL))
272
273$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/%.c
274	@($(LHEAD) $(LINT.c) $< $(LTAIL))
275
276$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/sun4u/%.s
277	@($(LHEAD) $(LINT.s) $< $(LTAIL))
278
279$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/sun4u/%.s
280	@($(LHEAD) $(LINT.s) $< $(LTAIL))
281
282$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/sun4u/%.s
283	@($(LHEAD) $(LINT.s) $< $(LTAIL))
284
285$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
286	@($(LHEAD) $(LINT.s) $< $(LTAIL))
287
288$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/rsa/%.s
289	@($(LHEAD) $(LINT.s) $< $(LTAIL))
290
291$(LINTS_DIR)/%.ln:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.c
292	@($(LHEAD) $(LINT.c) $< $(LTAIL))
293
294$(LINTS_DIR)/%.ln:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.s
295	@($(LHEAD) $(LINT.s) $< $(LTAIL))
296
297$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
298	@($(LHEAD) $(LINT.c) $< $(LTAIL))
299