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