xref: /titanic_41/usr/src/uts/sun4v/Makefile.rules (revision eb0cc229f19c437a6b538d3ac0d0443268290b7e)
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/sun4v
29#	and its children. These are the source files which sun4v
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, sun4v 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)/sun4v/cpu/%.c
44	$(COMPILE.c) -o $@ $<
45	$(CTFCONVERT_O)
46
47$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/cpu/%.s
48	$(COMPILE.s) -o $@ $<
49
50$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/%.c
51	$(COMPILE.c) -o $@ $<
52	$(CTFCONVERT_O)
53
54$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/ml/%.s
55	$(COMPILE.s) -o $@ $<
56
57$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/os/%.c
58	$(COMPILE.c) -o $@ $<
59	$(CTFCONVERT_O)
60
61$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/pcbe/%.c
62	$(COMPILE.c) -o $@ $<
63	$(CTFCONVERT_O)
64
65$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4/brand/sn1/%.s
66	$(COMPILE.s) -o $@ $<
67
68$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/promif/%.c
69	$(COMPILE.c) -o $@ $<
70	$(CTFCONVERT_O)
71
72$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/bmc/%.c
73	$(COMPILE.c) -o $@ $<
74	$(CTFCONVERT_O)
75
76$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/px/%.c
77	$(COMPILE.c) -o $@ $<
78	$(CTFCONVERT_O)
79
80$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/px/%.s
81	$(COMPILE.s) -o $@ $<
82
83$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/fpc/%.c
84	$(COMPILE.c) -o $@ $<
85	$(CTFCONVERT_O)
86
87$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/fpc/%.s
88	$(COMPILE.s) -o $@ $<
89
90$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2piupc/%.c
91	$(COMPILE.c) -o $@ $<
92	$(CTFCONVERT_O)
93
94$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2piupc/%.s
95	$(COMPILE.s) -o $@ $<
96
97$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/glvc/%.c
98	$(COMPILE.c) -o $@ $<
99	$(CTFCONVERT_O)
100
101$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/glvc/%.s
102	$(COMPILE.s) -o $@ $<
103
104$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.c
105	$(COMPILE.c) -o $@ $<
106	$(CTFCONVERT_O)
107
108$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.s
109	$(COMPILE.s) -o $@ $<
110
111$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
112	$(COMPILE.s) -o $@ $<
113
114$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
115	$(COMPILE.c) -o $@ $<
116	$(CTFCONVERT_O)
117
118$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
119	$(COMPILE.c) -o $@ $<
120	$(CTFCONVERT_O)
121
122$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
123	$(COMPILE.c) -o $@ $<
124	$(CTFCONVERT_O)
125
126$(OBJS_DIR)/%.o:		$(SRC)/common/mdesc/%.c
127	$(COMPILE.c) -o $@ $<
128	$(CTFCONVERT_O)
129
130$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/niumx/%.c
131	$(COMPILE.c) -o $@ $<
132	$(CTFCONVERT_O)
133
134$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2rng/%.c
135	$(COMPILE.c) -o $@ $<
136	$(CTFCONVERT_O)
137
138$(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/n2rng/%.s
139	$(COMPILE.s) -o $@ $<
140
141$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
142	$(COMPILE.s) -o $@ $<
143
144$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4v/%.c
145	$(COMPILE.c) -o $@ $<
146	$(CTFCONVERT_O)
147
148$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
149	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
150	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
151	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
152
153$(DTRACESTUBS):	$(DTRACESTUBS_O)
154	$(BUILD.SO) $(DTRACESTUBS_O)
155
156#
157#	Section 1b: Lint `object' build rules
158#
159$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.c
160	@($(LHEAD) $(LINT.c) $< $(LTAIL))
161
162$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.s
163	@($(LHEAD) $(LINT.s) $< $(LTAIL))
164
165$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/%.c
166	@($(LHEAD) $(LINT.c) $< $(LTAIL))
167
168$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/bmc/%.c
169	@($(LHEAD) $(LINT.c) $< $(LTAIL))
170
171$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.c
172	@($(LHEAD) $(LINT.c) $< $(LTAIL))
173
174$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.s
175	@($(LHEAD) $(LINT.s) $< $(LTAIL))
176
177$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/niumx/%.c
178	@($(LHEAD) $(LINT.c) $< $(LTAIL))
179
180$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.c
181	@($(LHEAD) $(LINT.c) $< $(LTAIL))
182
183$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.s
184	@($(LHEAD) $(LINT.s) $< $(LTAIL))
185
186$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2piupc/%.c
187	@($(LHEAD) $(LINT.c) $< $(LTAIL))
188
189$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2piupc/%.s
190	@($(LHEAD) $(LINT.s) $< $(LTAIL))
191
192$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.c
193	@($(LHEAD) $(LINT.c) $< $(LTAIL))
194
195$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.s
196	@($(LHEAD) $(LINT.s) $< $(LTAIL))
197
198$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2rng/%.c
199	@($(LHEAD) $(LINT.c) $< $(LTAIL))
200
201$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2rng/%.s
202	@($(LHEAD) $(LINT.s) $< $(LTAIL))
203
204$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/ml/%.s
205	@($(LHEAD) $(LINT.s) $< $(LTAIL))
206
207$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/os/%.c
208	@($(LHEAD) $(LINT.c) $< $(LTAIL))
209
210$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/pcbe/%.c
211	@($(LHEAD) $(LINT.c) $< $(LTAIL))
212
213$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/brand/sn1/%.s
214	@($(LHEAD) $(LINT.s) $< $(LTAIL))
215
216$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/promif/%.c
217	@($(LHEAD) $(LINT.c) $< $(LTAIL))
218
219$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.c
220	@($(LHEAD) $(LINT.c) $< $(LTAIL))
221
222$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.s
223	@($(LHEAD) $(LINT.s) $< $(LTAIL))
224
225$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
226	@($(LHEAD) $(LINT.s) $< $(LTAIL))
227
228$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
229	@($(LHEAD) $(LINT.c) $< $(LTAIL))
230
231$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
232	@($(LHEAD) $(LINT.c) $< $(LTAIL))
233
234$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
235	@($(LHEAD) $(LINT.c) $< $(LTAIL))
236
237$(LINTS_DIR)/%.ln:		$(SRC)/common/mdesc/%.c
238	@($(LHEAD) $(LINT.c) $< $(LTAIL))
239
240$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
241	@($(LHEAD) $(LINT.c) $< $(LTAIL))
242