xref: /titanic_44/usr/src/uts/sun4u/Makefile.rules (revision 9df12a23948bd40cbe37ce88d84e272c3894e675)
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 2006 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#
51# This rule for io/ppm/%.c needs to come before the io/%.c rule so that
52# the sun4u/ppm driver pulls in io/ppm/ppm.c instead of io/ppm.c.
53# Making an explicit rule to build ppm.o doesn't work because it breaks
54# the build of excalibur/xcalppm
55#
56$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/ppm/%.c
57	$(COMPILE.c) -o $@ $<
58	$(CTFCONVERT_O)
59
60$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/%.c
61	$(COMPILE.c) -o $@ $<
62	$(CTFCONVERT_O)
63
64$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
65	$(COMPILE.c) -o $@ $<
66	$(CTFCONVERT_O)
67
68$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
69	$(COMPILE.c) -o $@ $<
70	$(CTFCONVERT_O)
71
72$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
73	$(COMPILE.c) -o $@ $<
74	$(CTFCONVERT_O)
75
76$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.c
77	$(COMPILE.c) -o $@ $<
78	$(CTFCONVERT_O)
79
80$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.s
81	$(COMPILE.s) -o $@ $<
82
83$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.c
84	$(COMPILE.c) -o $@ $<
85	$(CTFCONVERT_O)
86
87$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/fpc/%.c
88	$(COMPILE.c) -o $@ $<
89	$(CTFCONVERT_O)
90
91$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.s
92	$(COMPILE.s) -o $@ $<
93
94$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/wrsm/%.c
95	$(COMPILE.c) -o $@ $<
96	$(CTFCONVERT_O)
97
98$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/wrsm/%.s
99	$(COMPILE.s) -o $@ $<
100
101$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/dmfe/%.c
102	$(COMPILE.c) -o $@ $<
103	$(CTFCONVERT_O)
104
105$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/ml/%.s
106	$(COMPILE.s) -o $@ $<
107
108$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/os/%.c
109	$(COMPILE.c) -o $@ $<
110	$(CTFCONVERT_O)
111
112$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/pcbe/%.c
113	$(COMPILE.c) -o $@ $<
114	$(CTFCONVERT_O)
115
116$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.c
117	$(COMPILE.c) -o $@ $<
118	$(CTFCONVERT_O)
119
120$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/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/crypto/aes/%.c
139	$(COMPILE.c) -o $@ $<
140	$(CTFCONVERT_O)
141
142$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/%.c
143	$(COMPILE.c) -o $@ $<
144	$(CTFCONVERT_O)
145
146$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/des/%.c
147	$(COMPILE.c) -o $@ $<
148	$(CTFCONVERT_O)
149
150$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/aes/sun4u/%.s
151	$(COMPILE.s) -o $@ $<
152
153$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4u/%.s
154	$(COMPILE.s) -o $@ $<
155
156$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/des/sun4u/%.s
157	$(COMPILE.s) -o $@ $<
158
159$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
160	$(COMPILE.s) -o $@ $<
161
162$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/rsa/%.s
163	$(COMPILE.s) -o $@ $<
164
165$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
166	$(COMPILE.s) -o $@ $<
167
168KMECHKRB5_BASE=$(UTSBASE)/common/gssapi/mechs/krb5
169
170$(OBJS_DIR)/%.o:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.c
171	$(COMPILE.c) -o $@ $<
172	$(CTFCONVERT_O)
173
174$(OBJS_DIR)/%.o:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.s
175	$(COMPILE.s) -o $@ $<
176
177$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
178	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
179	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
180	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
181
182$(DTRACESTUBS):	$(DTRACESTUBS_O)
183	$(BUILD.SO) $(DTRACESTUBS_O)
184
185#
186#	Section 1b: Lint `object' build rules
187#
188$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.c
189	@($(LHEAD) $(LINT.c) $< $(LTAIL))
190
191$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.s
192	@($(LHEAD) $(LINT.s) $< $(LTAIL))
193
194$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/ppm/%.c
195	@($(LHEAD) $(LINT.c) $< $(LTAIL))
196
197$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/%.c
198	@($(LHEAD) $(LINT.c) $< $(LTAIL))
199
200$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
201	@($(LHEAD) $(LINT.c) $< $(LTAIL))
202
203$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
204	@($(LHEAD) $(LINT.c) $< $(LTAIL))
205
206$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
207	@($(LHEAD) $(LINT.c) $< $(LTAIL))
208
209$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.c
210	@($(LHEAD) $(LINT.c) $< $(LTAIL))
211
212$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.s
213	@($(LHEAD) $(LINT.s) $< $(LTAIL))
214
215$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.c
216	@($(LHEAD) $(LINT.c) $< $(LTAIL))
217
218$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.s
219	@($(LHEAD) $(LINT.s) $< $(LTAIL))
220
221$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/fpc/%.c
222	@($(LHEAD) $(LINT.c) $< $(LTAIL))
223
224$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/wrsm/%.c
225	@($(LHEAD) $(LINT.c) $< $(LTAIL))
226
227$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/wrsm/%.s
228	@($(LHEAD) $(LINT.s) $< $(LTAIL))
229
230$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/dmfe/%.c
231	@($(LHEAD) $(LINT.c) $< $(LTAIL))
232
233$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/ml/%.s
234	@($(LHEAD) $(LINT.s) $< $(LTAIL))
235
236$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/os/%.c
237	@($(LHEAD) $(LINT.c) $< $(LTAIL))
238
239$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/pcbe/%.c
240	@($(LHEAD) $(LINT.c) $< $(LTAIL))
241
242$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.c
243	@($(LHEAD) $(LINT.c) $< $(LTAIL))
244
245$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.s
246	@($(LHEAD) $(LINT.s) $< $(LTAIL))
247
248$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
249	@($(LHEAD) $(LINT.s) $< $(LTAIL))
250
251$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
252	@($(LHEAD) $(LINT.c) $< $(LTAIL))
253
254$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
255	@($(LHEAD) $(LINT.c) $< $(LTAIL))
256
257$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
258	@($(LHEAD) $(LINT.c) $< $(LTAIL))
259
260$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/%.c
261	@($(LHEAD) $(LINT.c) $< $(LTAIL))
262
263$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/%.c
264	@($(LHEAD) $(LINT.c) $< $(LTAIL))
265
266$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/%.c
267	@($(LHEAD) $(LINT.c) $< $(LTAIL))
268
269$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/sun4u/%.s
270	@($(LHEAD) $(LINT.s) $< $(LTAIL))
271
272$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/sun4u/%.s
273	@($(LHEAD) $(LINT.s) $< $(LTAIL))
274
275$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/sun4u/%.s
276	@($(LHEAD) $(LINT.s) $< $(LTAIL))
277
278$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
279	@($(LHEAD) $(LINT.s) $< $(LTAIL))
280
281$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/rsa/%.s
282	@($(LHEAD) $(LINT.s) $< $(LTAIL))
283
284$(LINTS_DIR)/%.ln:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.c
285	@($(LHEAD) $(LINT.c) $< $(LTAIL))
286
287$(LINTS_DIR)/%.ln:		$(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.s
288	@($(LHEAD) $(LINT.s) $< $(LTAIL))
289
290$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
291	@($(LHEAD) $(LINT.c) $< $(LTAIL))
292