xref: /titanic_44/usr/src/uts/sun4v/Makefile.rules (revision c5c4113dfcabb1eed3d4bdf7609de5170027a794)
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/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/px/%.c
73	$(COMPILE.c) -o $@ $<
74	$(CTFCONVERT_O)
75
76$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/px/%.s
77	$(COMPILE.s) -o $@ $<
78
79$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/fpc/%.c
80	$(COMPILE.c) -o $@ $<
81	$(CTFCONVERT_O)
82
83$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/fpc/%.s
84	$(COMPILE.s) -o $@ $<
85
86$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2piupc/%.c
87	$(COMPILE.c) -o $@ $<
88	$(CTFCONVERT_O)
89
90$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/n2piupc/%.s
91	$(COMPILE.s) -o $@ $<
92
93$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/glvc/%.c
94	$(COMPILE.c) -o $@ $<
95	$(CTFCONVERT_O)
96
97$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/glvc/%.s
98	$(COMPILE.s) -o $@ $<
99
100$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.c
101	$(COMPILE.c) -o $@ $<
102	$(CTFCONVERT_O)
103
104$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.s
105	$(COMPILE.s) -o $@ $<
106
107$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
108	$(COMPILE.s) -o $@ $<
109
110$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
111	$(COMPILE.c) -o $@ $<
112	$(CTFCONVERT_O)
113
114$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
115	$(COMPILE.c) -o $@ $<
116	$(CTFCONVERT_O)
117
118$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
119	$(COMPILE.c) -o $@ $<
120	$(CTFCONVERT_O)
121
122$(OBJS_DIR)/%.o:		$(SRC)/common/mdesc/%.c
123	$(COMPILE.c) -o $@ $<
124	$(CTFCONVERT_O)
125
126$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/niumx/%.c
127	$(COMPILE.c) -o $@ $<
128	$(CTFCONVERT_O)
129
130$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
131	$(COMPILE.s) -o $@ $<
132
133$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4v/%.c
134	$(COMPILE.c) -o $@ $<
135	$(CTFCONVERT_O)
136
137$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
138	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
139	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
140	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
141
142$(DTRACESTUBS):	$(DTRACESTUBS_O)
143	$(BUILD.SO) $(DTRACESTUBS_O)
144
145#
146#	Section 1b: Lint `object' build rules
147#
148$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.c
149	@($(LHEAD) $(LINT.c) $< $(LTAIL))
150
151$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.s
152	@($(LHEAD) $(LINT.s) $< $(LTAIL))
153
154$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/%.c
155	@($(LHEAD) $(LINT.c) $< $(LTAIL))
156
157$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.c
158	@($(LHEAD) $(LINT.c) $< $(LTAIL))
159
160$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.s
161	@($(LHEAD) $(LINT.s) $< $(LTAIL))
162
163$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/niumx/%.c
164	@($(LHEAD) $(LINT.c) $< $(LTAIL))
165
166$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.c
167	@($(LHEAD) $(LINT.c) $< $(LTAIL))
168
169$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.s
170	@($(LHEAD) $(LINT.s) $< $(LTAIL))
171
172$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2piupc/%.c
173	@($(LHEAD) $(LINT.c) $< $(LTAIL))
174
175$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/n2piupc/%.s
176	@($(LHEAD) $(LINT.s) $< $(LTAIL))
177
178$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.c
179	@($(LHEAD) $(LINT.c) $< $(LTAIL))
180
181$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.s
182	@($(LHEAD) $(LINT.s) $< $(LTAIL))
183
184$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/ml/%.s
185	@($(LHEAD) $(LINT.s) $< $(LTAIL))
186
187$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/os/%.c
188	@($(LHEAD) $(LINT.c) $< $(LTAIL))
189
190$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/pcbe/%.c
191	@($(LHEAD) $(LINT.c) $< $(LTAIL))
192
193$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/brand/sn1/%.s
194	@($(LHEAD) $(LINT.s) $< $(LTAIL))
195
196$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/promif/%.c
197	@($(LHEAD) $(LINT.c) $< $(LTAIL))
198
199$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.c
200	@($(LHEAD) $(LINT.c) $< $(LTAIL))
201
202$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.s
203	@($(LHEAD) $(LINT.s) $< $(LTAIL))
204
205$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
206	@($(LHEAD) $(LINT.s) $< $(LTAIL))
207
208$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
209	@($(LHEAD) $(LINT.c) $< $(LTAIL))
210
211$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
212	@($(LHEAD) $(LINT.c) $< $(LTAIL))
213
214$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
215	@($(LHEAD) $(LINT.c) $< $(LTAIL))
216
217$(LINTS_DIR)/%.ln:		$(SRC)/common/mdesc/%.c
218	@($(LHEAD) $(LINT.c) $< $(LTAIL))
219
220$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
221	@($(LHEAD) $(LINT.c) $< $(LTAIL))
222