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