8416 abd.h is not C++ friendly
[unleashed.git] / usr / src / uts / sun4v / Makefile.rules
blob7675e358fdd8b62e2bd7f2b349b287cc1e9807a2
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
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.
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.
37 #         Lines whose initial directory components are equal are sorted
38 #         alphabetically by the remaining components.
41 #       Section 1a: C object build rules
43 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/cpu/%.c
44         $(COMPILE.c) -o $@ $<
45         $(CTFCONVERT_O)
47 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/cpu/%.s
48         $(COMPILE.s) -o $@ $<
50 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/%.c
51         $(COMPILE.c) -o $@ $<
52         $(CTFCONVERT_O)
54 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/ml/%.s
55         $(COMPILE.s) -o $@ $<
57 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/os/%.c
58         $(COMPILE.c) -o $@ $<
59         $(CTFCONVERT_O)
61 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/pcbe/%.c
62         $(COMPILE.c) -o $@ $<
63         $(CTFCONVERT_O)
65 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4/brand/sn1/%.s
66         $(COMPILE.s) -o $@ $<
68 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4/brand/solaris10/%.s
69         $(COMPILE.s) -o $@ $<
71 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/promif/%.c
72         $(COMPILE.c) -o $@ $<
73         $(CTFCONVERT_O)
75 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/px/%.c
76         $(COMPILE.c) -o $@ $<
77         $(CTFCONVERT_O)
79 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/px/%.s
80         $(COMPILE.s) -o $@ $<
82 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/fpc/%.c
83         $(COMPILE.c) -o $@ $<
84         $(CTFCONVERT_O)
86 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/fpc/%.s
87         $(COMPILE.s) -o $@ $<
89 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/n2piupc/%.c
90         $(COMPILE.c) -o $@ $<
91         $(CTFCONVERT_O)
93 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/n2piupc/%.s
94         $(COMPILE.s) -o $@ $<
96 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/iospc/%.c
97         $(COMPILE.c) -o $@ $<
98         $(CTFCONVERT_O)
100 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/iospc/%.s
101         $(COMPILE.s) -o $@ $<
103 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/glvc/%.c
104         $(COMPILE.c) -o $@ $<
105         $(CTFCONVERT_O)
107 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/glvc/%.s
108         $(COMPILE.s) -o $@ $<
110 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/pciex/%.c
111         $(COMPILE.c) -o $@ $<
112         $(CTFCONVERT_O)
114 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/pciex/%.s
115         $(COMPILE.s) -o $@ $<
117 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/vm/%.c
118         $(COMPILE.c) -o $@ $<
119         $(CTFCONVERT_O)
121 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/vm/%.s
122         $(COMPILE.s) -o $@ $<
124 $(OBJS_DIR)/%.o:                $(UTSBASE)/sfmmu/ml/%.s
125         $(COMPILE.s) -o $@ $<
127 $(OBJS_DIR)/%.o:                $(UTSBASE)/sfmmu/vm/%.c
128         $(COMPILE.c) -o $@ $<
129         $(CTFCONVERT_O)
131 $(OBJS_DIR)/%.o:                $(UTSBASE)/sparc/os/%.c
132         $(COMPILE.c) -o $@ $<
133         $(CTFCONVERT_O)
135 $(OBJS_DIR)/%.o:                $(UTSBASE)/common/os/%.c
136         $(COMPILE.c) -o $@ $<
137         $(CTFCONVERT_O)
139 $(OBJS_DIR)/%.o:                $(SRC)/common/mdesc/%.c
140         $(COMPILE.c) -o $@ $<
141         $(CTFCONVERT_O)
143 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/niumx/%.c
144         $(COMPILE.c) -o $@ $<
145         $(CTFCONVERT_O)
147 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/n2rng/%.c
148         $(COMPILE.c) -o $@ $<
149         $(CTFCONVERT_O)
151 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/%.s
152         $(COMPILE.s) -o $@ $<
154 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4v/io/n2rng/%.s
155         $(COMPILE.s) -o $@ $<
157 $(OBJS_DIR)/%.o:                $(SRC)/common/atomic/sparcv9/%.s
158         $(COMPILE.s) -o $@ $<
160 $(OBJS_DIR)/%.o:                $(SRC)/common/crypto/arcfour/sun4v/%.c
161         $(COMPILE.c) -o $@ $<
162         $(CTFCONVERT_O)
164 $(OBJS_DIR)/dtracestubs.s:      $(UNIX_O) $(LIBS)
165         $(NM) -u $(UNIX_O) $(LIBS) | $(GREP) __dtrace_probe_ | $(SORT) | \
166             $(UNIQ) | $(AWK) '{ \
167             printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
168             $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
170 $(DTRACESTUBS): $(DTRACESTUBS_O)
171         $(BUILD.SO) $(DTRACESTUBS_O)
174 #       Section 1b: Lint `object' build rules
176 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/cpu/%.c
177         @($(LHEAD) $(LINT.c) $< $(LTAIL))
179 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/cpu/%.s
180         @($(LHEAD) $(LINT.s) $< $(LTAIL))
182 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/%.c
183         @($(LHEAD) $(LINT.c) $< $(LTAIL))
185 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/%.s
186         @($(LHEAD) $(LINT.s) $< $(LTAIL))
188 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/px/%.c
189         @($(LHEAD) $(LINT.c) $< $(LTAIL))
191 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/px/%.s
192         @($(LHEAD) $(LINT.s) $< $(LTAIL))
194 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/niumx/%.c
195         @($(LHEAD) $(LINT.c) $< $(LTAIL))
197 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/fpc/%.c
198         @($(LHEAD) $(LINT.c) $< $(LTAIL))
200 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/fpc/%.s
201         @($(LHEAD) $(LINT.s) $< $(LTAIL))
203 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/n2piupc/%.c
204         @($(LHEAD) $(LINT.c) $< $(LTAIL))
206 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/n2piupc/%.s
207         @($(LHEAD) $(LINT.s) $< $(LTAIL))
209 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/iospc/%.c
210         @($(LHEAD) $(LINT.c) $< $(LTAIL))
212 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/iospc/%.s
213         @($(LHEAD) $(LINT.s) $< $(LTAIL))
215 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/glvc/%.c
216         @($(LHEAD) $(LINT.c) $< $(LTAIL))
218 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/glvc/%.s
219         @($(LHEAD) $(LINT.s) $< $(LTAIL))
221 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/n2rng/%.c
222         @($(LHEAD) $(LINT.c) $< $(LTAIL))
224 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/n2rng/%.s
225         @($(LHEAD) $(LINT.s) $< $(LTAIL))
227 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/pciex/%.c
228         @($(LHEAD) $(LINT.c) $< $(LTAIL))
230 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/io/pciex/%.s
231         @($(LHEAD) $(LINT.s) $< $(LTAIL))
233 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/ml/%.s
234         @($(LHEAD) $(LINT.s) $< $(LTAIL))
236 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/os/%.c
237         @($(LHEAD) $(LINT.c) $< $(LTAIL))
239 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/pcbe/%.c
240         @($(LHEAD) $(LINT.c) $< $(LTAIL))
242 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4/brand/sn1/%.s
243         @($(LHEAD) $(LINT.s) $< $(LTAIL))
245 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4/brand/solaris10/%.s
246         @($(LHEAD) $(LINT.s) $< $(LTAIL))
248 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/promif/%.c
249         @($(LHEAD) $(LINT.c) $< $(LTAIL))
251 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/vm/%.c
252         @($(LHEAD) $(LINT.c) $< $(LTAIL))
254 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4v/vm/%.s
255         @($(LHEAD) $(LINT.s) $< $(LTAIL))
257 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sfmmu/ml/%.s
258         @($(LHEAD) $(LINT.s) $< $(LTAIL))
260 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sfmmu/vm/%.c
261         @($(LHEAD) $(LINT.c) $< $(LTAIL))
263 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sparc/os/%.c
264         @($(LHEAD) $(LINT.c) $< $(LTAIL))
266 $(LINTS_DIR)/%.ln:              $(UTSBASE)/common/os/%.c
267         @($(LHEAD) $(LINT.c) $< $(LTAIL))
269 $(LINTS_DIR)/%.ln:              $(SRC)/common/mdesc/%.c
270         @($(LHEAD) $(LINT.c) $< $(LTAIL))
272 $(LINTS_DIR)/%.ln:              $(SRC)/common/atomic/%.c
273         @($(LHEAD) $(LINT.c) $< $(LTAIL))
275 $(LINTS_DIR)/%.ln:              $(SRC)/common/crypto/arcfour/sun4v/%.c
276         @($(LHEAD) $(LINT.c) $< $(LTAIL))