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