xref: /titanic_52/usr/src/uts/sun4v/Makefile.rules (revision 1cea05af420c1992d793dc442f4e30c7269fc107)
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 2006 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)/sun4v/promif/%.c
66	$(COMPILE.c) -o $@ $<
67	$(CTFCONVERT_O)
68
69$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/px/%.c
70	$(COMPILE.c) -o $@ $<
71	$(CTFCONVERT_O)
72
73$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/px/%.s
74	$(COMPILE.s) -o $@ $<
75
76$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/nxge/%.c
77	$(COMPILE.c) -o $@ $<
78	$(CTFCONVERT_O)
79
80$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/nxge/%.s
81	$(COMPILE.s) -o $@ $<
82
83$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/nxge/npi/%.c
84	$(COMPILE.c) -o $@ $<
85	$(CTFCONVERT_O)
86
87$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/fpc/%.c
88	$(COMPILE.c) -o $@ $<
89	$(CTFCONVERT_O)
90
91$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/fpc/%.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:		$(SRC)/common/atomic/sparcv9/%.s
132	$(COMPILE.s) -o $@ $<
133
134$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4v/%.c
135	$(COMPILE.c) -o $@ $<
136	$(CTFCONVERT_O)
137
138$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
139	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
140	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
141	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
142
143$(DTRACESTUBS):	$(DTRACESTUBS_O)
144	$(BUILD.SO) $(DTRACESTUBS_O)
145
146#
147#	Section 1b: Lint `object' build rules
148#
149$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.c
150	@($(LHEAD) $(LINT.c) $< $(LTAIL))
151
152$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.s
153	@($(LHEAD) $(LINT.s) $< $(LTAIL))
154
155$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/%.c
156	@($(LHEAD) $(LINT.c) $< $(LTAIL))
157
158$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.c
159	@($(LHEAD) $(LINT.c) $< $(LTAIL))
160
161$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.s
162	@($(LHEAD) $(LINT.s) $< $(LTAIL))
163
164$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/niumx/%.c
165	@($(LHEAD) $(LINT.c) $< $(LTAIL))
166
167$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/nxge/%.c
168	@($(LHEAD) $(LINT.c) $< $(LTAIL))
169
170$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/nxge/%.s
171	@($(LHEAD) $(LINT.c) $< $(LTAIL))
172
173$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/nxge/npi/%.c
174	@($(LHEAD) $(LINT.c) $< $(LTAIL))
175
176$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.c
177	@($(LHEAD) $(LINT.c) $< $(LTAIL))
178
179$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/fpc/%.s
180	@($(LHEAD) $(LINT.s) $< $(LTAIL))
181
182$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.c
183	@($(LHEAD) $(LINT.c) $< $(LTAIL))
184
185$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/glvc/%.s
186	@($(LHEAD) $(LINT.s) $< $(LTAIL))
187
188$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/ml/%.s
189	@($(LHEAD) $(LINT.s) $< $(LTAIL))
190
191$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/os/%.c
192	@($(LHEAD) $(LINT.c) $< $(LTAIL))
193
194$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/pcbe/%.c
195	@($(LHEAD) $(LINT.c) $< $(LTAIL))
196
197$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/promif/%.c
198	@($(LHEAD) $(LINT.c) $< $(LTAIL))
199
200$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.c
201	@($(LHEAD) $(LINT.c) $< $(LTAIL))
202
203$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.s
204	@($(LHEAD) $(LINT.s) $< $(LTAIL))
205
206$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
207	@($(LHEAD) $(LINT.s) $< $(LTAIL))
208
209$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
210	@($(LHEAD) $(LINT.c) $< $(LTAIL))
211
212$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
213	@($(LHEAD) $(LINT.c) $< $(LTAIL))
214
215$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
216	@($(LHEAD) $(LINT.c) $< $(LTAIL))
217
218$(LINTS_DIR)/%.ln:		$(SRC)/common/mdesc/%.c
219	@($(LHEAD) $(LINT.c) $< $(LTAIL))
220
221$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
222	@($(LHEAD) $(LINT.c) $< $(LTAIL))
223