xref: /titanic_52/usr/src/uts/sun4u/Makefile.rules (revision 5a3c8170a75e81911cf43e0eb9ad5cdabb5f1e39)
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 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#	This Makefile defines the build rules for the directory uts/sun4u
27#	and its children. These are the source files which sun4u
28#	"implementation architecture" dependent.
29#
30#	The following two-level ordering must be maintained in this file.
31#	  Lines are sorted first in order of decreasing specificity based on
32#	  the first directory component.  That is, sun4u rules come before
33#	  sparc rules come before common rules.
34#
35#	  Lines whose initial directory components are equal are sorted
36#	  alphabetically by the remaining components.
37
38#
39#	Section 1a: C object build rules
40#
41$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/cpu/%.c
42	$(COMPILE.c) -o $@ $<
43	$(CTFCONVERT_O)
44
45$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/cpu/%.s
46	$(COMPILE.s) -o $@ $<
47
48#
49# This rule for io/ppm/%.c needs to come before the io/%.c rule so that
50# the sun4u/ppm driver pulls in io/ppm/ppm.c instead of io/ppm.c.
51# Making an explicit rule to build ppm.o doesn't work because it breaks
52# the build of excalibur/xcalppm
53#
54$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/ppm/%.c
55	$(COMPILE.c) -o $@ $<
56	$(CTFCONVERT_O)
57
58$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/ppm/%.c
59	$(COMPILE.c) -o $@ $<
60	$(CTFCONVERT_O)
61
62$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/%.s
63	$(COMPILE.s) -o $@ $<
64
65$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/%.c
66	$(COMPILE.c) -o $@ $<
67	$(CTFCONVERT_O)
68
69$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
70	$(COMPILE.c) -o $@ $<
71	$(CTFCONVERT_O)
72
73$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
74	$(COMPILE.c) -o $@ $<
75	$(CTFCONVERT_O)
76
77$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
78	$(COMPILE.c) -o $@ $<
79	$(CTFCONVERT_O)
80
81$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.c
82	$(COMPILE.c) -o $@ $<
83	$(CTFCONVERT_O)
84
85$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.s
86	$(COMPILE.s) -o $@ $<
87
88$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.c
89	$(COMPILE.c) -o $@ $<
90	$(CTFCONVERT_O)
91
92$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.s
93	$(COMPILE.s) -o $@ $<
94
95$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/ml/%.s
96	$(COMPILE.s) -o $@ $<
97
98$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/os/%.c
99	$(COMPILE.c) -o $@ $<
100	$(CTFCONVERT_O)
101
102$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/pcbe/%.c
103	$(COMPILE.c) -o $@ $<
104	$(CTFCONVERT_O)
105
106$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4/brand/sn1/%.s
107	$(COMPILE.s) -o $@ $<
108
109$(OBJS_DIR)/%.o:                $(UTSBASE)/sun4/brand/solaris10/%.s
110	$(COMPILE.s) -o $@ $<
111
112$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.c
113	$(COMPILE.c) -o $@ $<
114	$(CTFCONVERT_O)
115
116$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.s
117	$(COMPILE.s) -o $@ $<
118
119$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
120	$(COMPILE.s) -o $@ $<
121
122$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
123	$(COMPILE.c) -o $@ $<
124	$(CTFCONVERT_O)
125
126$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
127	$(COMPILE.c) -o $@ $<
128	$(CTFCONVERT_O)
129
130$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
131	$(COMPILE.c) -o $@ $<
132	$(CTFCONVERT_O)
133
134$(OBJS_DIR)/%.o:		$(SRC)/common/bignum/sun4u/%.s
135	$(COMPILE.s) -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:		$(SRC)/common/atomic/sparcv9/%.s
162	$(COMPILE.s) -o $@ $<
163
164$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
165	$(NM) -u $(UNIX_O) $(LIBS) | $(GREP) __dtrace_probe_ | $(SORT) | \
166	    $(UNIQ) | $(NAWK) '{ \
167	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
168	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
169
170$(DTRACESTUBS):	$(DTRACESTUBS_O)
171	$(BUILD.SO) $(DTRACESTUBS_O)
172
173#
174#	Section 1b: Lint `object' build rules
175#
176$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.c
177	@($(LHEAD) $(LINT.c) $< $(LTAIL))
178
179$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.s
180	@($(LHEAD) $(LINT.s) $< $(LTAIL))
181
182$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/ppm/%.c
183	@($(LHEAD) $(LINT.c) $< $(LTAIL))
184
185$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/ppm/%.c
186	@($(LHEAD) $(LINT.c) $< $(LTAIL))
187
188$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/%.c
189	@($(LHEAD) $(LINT.c) $< $(LTAIL))
190
191$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/%.s
192	@($(LHEAD) $(LINT.s) $< $(LTAIL))
193
194$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
195	@($(LHEAD) $(LINT.c) $< $(LTAIL))
196
197$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
198	@($(LHEAD) $(LINT.c) $< $(LTAIL))
199
200$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
201	@($(LHEAD) $(LINT.c) $< $(LTAIL))
202
203$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.c
204	@($(LHEAD) $(LINT.c) $< $(LTAIL))
205
206$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.s
207	@($(LHEAD) $(LINT.s) $< $(LTAIL))
208
209$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.c
210	@($(LHEAD) $(LINT.c) $< $(LTAIL))
211
212$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.s
213	@($(LHEAD) $(LINT.s) $< $(LTAIL))
214
215$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/ml/%.s
216	@($(LHEAD) $(LINT.s) $< $(LTAIL))
217
218$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/os/%.c
219	@($(LHEAD) $(LINT.c) $< $(LTAIL))
220
221$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/pcbe/%.c
222	@($(LHEAD) $(LINT.c) $< $(LTAIL))
223
224$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/brand/sn1/%.s
225	@($(LHEAD) $(LINT.s) $< $(LTAIL))
226
227$(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4/brand/solaris10/%.s
228	@($(LHEAD) $(LINT.s) $< $(LTAIL))
229
230$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.c
231	@($(LHEAD) $(LINT.c) $< $(LTAIL))
232
233$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.s
234	@($(LHEAD) $(LINT.s) $< $(LTAIL))
235
236$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
237	@($(LHEAD) $(LINT.s) $< $(LTAIL))
238
239$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
240	@($(LHEAD) $(LINT.c) $< $(LTAIL))
241
242$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
243	@($(LHEAD) $(LINT.c) $< $(LTAIL))
244
245$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
246	@($(LHEAD) $(LINT.c) $< $(LTAIL))
247
248$(LINTS_DIR)/%.ln:		$(SRC)/common/bignum/sun4u/%.s
249	@($(LHEAD) $(LINT.s) $< $(LTAIL))
250
251$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/%.c
252	@($(LHEAD) $(LINT.c) $< $(LTAIL))
253
254$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/%.c
255	@($(LHEAD) $(LINT.c) $< $(LTAIL))
256
257$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/%.c
258	@($(LHEAD) $(LINT.c) $< $(LTAIL))
259
260$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/sun4u/%.s
261	@($(LHEAD) $(LINT.s) $< $(LTAIL))
262
263$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/sun4u/%.s
264	@($(LHEAD) $(LINT.s) $< $(LTAIL))
265
266$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/sun4u/%.s
267	@($(LHEAD) $(LINT.s) $< $(LTAIL))
268
269$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
270	@($(LHEAD) $(LINT.s) $< $(LTAIL))
271
272$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
273	@($(LHEAD) $(LINT.c) $< $(LTAIL))
274