9000 unix: cleanup 32-bit specific code in fakebop
[unleashed.git] / usr / src / uts / sun4u / Makefile.rules
blobf16022e6fc1375a8ff59112aeba3169f96d0b96a
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 2009 Sun Microsystems, Inc.  All rights reserved.
24 # Use is subject to license terms.
25 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
27 #       This Makefile defines the build rules for the directory uts/sun4u
28 #       and its children. These are the source files which sun4u
29 #       "implementation architecture" dependent.
31 #       The following two-level ordering must be maintained in this file.
32 #         Lines are sorted first in order of decreasing specificity based on
33 #         the first directory component.  That is, sun4u rules come before
34 #         sparc rules come before common rules.
36 #         Lines whose initial directory components are equal are sorted
37 #         alphabetically by the remaining components.
40 #       Section 1a: C object build rules
42 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/cpu/%.c
43         $(COMPILE.c) -o $@ $<
44         $(CTFCONVERT_O)
46 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/cpu/%.s
47         $(COMPILE.s) -o $@ $<
50 # This rule for io/ppm/%.c needs to come before the io/%.c rule so that
51 # the sun4u/ppm driver pulls in io/ppm/ppm.c instead of io/ppm.c.
52 # Making an explicit rule to build ppm.o doesn't work because it breaks
53 # the build of excalibur/xcalppm
55 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/ppm/%.c
56         $(COMPILE.c) -o $@ $<
57         $(CTFCONVERT_O)
59 $(OBJS_DIR)/%.o:                $(UTSBASE)/common/io/ppm/%.c
60         $(COMPILE.c) -o $@ $<
61         $(CTFCONVERT_O)
63 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/%.s
64         $(COMPILE.s) -o $@ $<
66 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/%.c
67         $(COMPILE.c) -o $@ $<
68         $(CTFCONVERT_O)
70 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/i2c/clients/%.c
71         $(COMPILE.c) -o $@ $<
72         $(CTFCONVERT_O)
74 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/i2c/misc/%.c
75         $(COMPILE.c) -o $@ $<
76         $(CTFCONVERT_O)
78 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/i2c/nexus/%.c
79         $(COMPILE.c) -o $@ $<
80         $(CTFCONVERT_O)
82 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/pci/%.c
83         $(COMPILE.c) -o $@ $<
84         $(CTFCONVERT_O)
86 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/pci/%.s
87         $(COMPILE.s) -o $@ $<
89 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/px/%.c
90         $(COMPILE.c) -o $@ $<
91         $(CTFCONVERT_O)
93 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/px/%.s
94         $(COMPILE.s) -o $@ $<
96 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/pciex/%.c
97         $(COMPILE.c) -o $@ $<
98         $(CTFCONVERT_O)
100 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/io/pciex/%.s
101         $(COMPILE.s) -o $@ $<
103 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/ml/%.s
104         $(COMPILE.s) -o $@ $<
106 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/os/%.c
107         $(COMPILE.c) -o $@ $<
108         $(CTFCONVERT_O)
110 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/pcbe/%.c
111         $(COMPILE.c) -o $@ $<
112         $(CTFCONVERT_O)
114 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4/brand/sn1/%.s
115         $(COMPILE.s) -o $@ $<
117 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4/brand/solaris10/%.s
118         $(COMPILE.s) -o $@ $<
120 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/vm/%.c
121         $(COMPILE.c) -o $@ $<
122         $(CTFCONVERT_O)
124 $(OBJS_DIR)/%.o:                $(UTSBASE)/sun4u/vm/%.s
125         $(COMPILE.s) -o $@ $<
127 $(OBJS_DIR)/%.o:                $(UTSBASE)/sfmmu/ml/%.s
128         $(COMPILE.s) -o $@ $<
130 $(OBJS_DIR)/%.o:                $(UTSBASE)/sfmmu/vm/%.c
131         $(COMPILE.c) -o $@ $<
132         $(CTFCONVERT_O)
134 $(OBJS_DIR)/%.o:                $(UTSBASE)/sparc/os/%.c
135         $(COMPILE.c) -o $@ $<
136         $(CTFCONVERT_O)
138 $(OBJS_DIR)/%.o:                $(UTSBASE)/common/os/%.c
139         $(COMPILE.c) -o $@ $<
140         $(CTFCONVERT_O)
142 $(OBJS_DIR)/%.o:                $(SRC)/common/bignum/sun4u/%.s
143         $(COMPILE.s) -o $@ $<
145 $(OBJS_DIR)/%.o:                $(SRC)/common/crypto/aes/%.c
146         $(COMPILE.c) -o $@ $<
147         $(CTFCONVERT_O)
149 $(OBJS_DIR)/%.o:                $(SRC)/common/crypto/arcfour/%.c
150         $(COMPILE.c) -o $@ $<
151         $(CTFCONVERT_O)
153 $(OBJS_DIR)/%.o:                $(SRC)/common/crypto/des/%.c
154         $(COMPILE.c) -o $@ $<
155         $(CTFCONVERT_O)
157 $(OBJS_DIR)/%.o:                $(SRC)/common/crypto/aes/sun4u/%.s
158         $(COMPILE.s) -o $@ $<
160 $(OBJS_DIR)/%.o:                $(SRC)/common/crypto/arcfour/sun4u/%.s
161         $(COMPILE.s) -o $@ $<
163 $(OBJS_DIR)/%.o:                $(SRC)/common/crypto/des/sun4u/%.s
164         $(COMPILE.s) -o $@ $<
166 $(OBJS_DIR)/%.o:                $(SRC)/common/crypto/sha1/sparc/sun4u/%.s
167         $(COMPILE.s) -o $@ $<
169 $(OBJS_DIR)/%.o:                $(SRC)/common/atomic/sparcv9/%.s
170         $(COMPILE.s) -o $@ $<
172 $(OBJS_DIR)/dtracestubs.s:      $(UNIX_O) $(LIBS)
173         $(NM) -u $(UNIX_O) $(LIBS) | $(GREP) __dtrace_probe_ | $(SORT) | \
174             $(UNIQ) | $(AWK) '{ \
175             printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
176             $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
178 $(DTRACESTUBS): $(DTRACESTUBS_O)
179         $(BUILD.SO) $(DTRACESTUBS_O)
182 #       Section 1b: Lint `object' build rules
184 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/cpu/%.c
185         @($(LHEAD) $(LINT.c) $< $(LTAIL))
187 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/cpu/%.s
188         @($(LHEAD) $(LINT.s) $< $(LTAIL))
190 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/ppm/%.c
191         @($(LHEAD) $(LINT.c) $< $(LTAIL))
193 $(LINTS_DIR)/%.ln:              $(UTSBASE)/common/io/ppm/%.c
194         @($(LHEAD) $(LINT.c) $< $(LTAIL))
196 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/%.c
197         @($(LHEAD) $(LINT.c) $< $(LTAIL))
199 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/%.s
200         @($(LHEAD) $(LINT.s) $< $(LTAIL))
202 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/i2c/clients/%.c
203         @($(LHEAD) $(LINT.c) $< $(LTAIL))
205 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/i2c/misc/%.c
206         @($(LHEAD) $(LINT.c) $< $(LTAIL))
208 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/i2c/nexus/%.c
209         @($(LHEAD) $(LINT.c) $< $(LTAIL))
211 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/pci/%.c
212         @($(LHEAD) $(LINT.c) $< $(LTAIL))
214 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/pci/%.s
215         @($(LHEAD) $(LINT.s) $< $(LTAIL))
217 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/px/%.c
218         @($(LHEAD) $(LINT.c) $< $(LTAIL))
220 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/px/%.s
221         @($(LHEAD) $(LINT.s) $< $(LTAIL))
223 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/pciex/%.c
224         @($(LHEAD) $(LINT.c) $< $(LTAIL))
226 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/io/pciex/%.s
227         @($(LHEAD) $(LINT.s) $< $(LTAIL))
229 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/ml/%.s
230         @($(LHEAD) $(LINT.s) $< $(LTAIL))
232 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/os/%.c
233         @($(LHEAD) $(LINT.c) $< $(LTAIL))
235 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/pcbe/%.c
236         @($(LHEAD) $(LINT.c) $< $(LTAIL))
238 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4/brand/sn1/%.s
239         @($(LHEAD) $(LINT.s) $< $(LTAIL))
241 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4/brand/solaris10/%.s
242         @($(LHEAD) $(LINT.s) $< $(LTAIL))
244 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/vm/%.c
245         @($(LHEAD) $(LINT.c) $< $(LTAIL))
247 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4u/vm/%.s
248         @($(LHEAD) $(LINT.s) $< $(LTAIL))
250 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sfmmu/ml/%.s
251         @($(LHEAD) $(LINT.s) $< $(LTAIL))
253 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sfmmu/vm/%.c
254         @($(LHEAD) $(LINT.c) $< $(LTAIL))
256 $(LINTS_DIR)/%.ln:              $(UTSBASE)/sparc/os/%.c
257         @($(LHEAD) $(LINT.c) $< $(LTAIL))
259 $(LINTS_DIR)/%.ln:              $(UTSBASE)/common/os/%.c
260         @($(LHEAD) $(LINT.c) $< $(LTAIL))
262 $(LINTS_DIR)/%.ln:              $(SRC)/common/bignum/sun4u/%.s
263         @($(LHEAD) $(LINT.s) $< $(LTAIL))
265 $(LINTS_DIR)/%.ln:              $(SRC)/common/crypto/aes/%.c
266         @($(LHEAD) $(LINT.c) $< $(LTAIL))
268 $(LINTS_DIR)/%.ln:              $(SRC)/common/crypto/arcfour/%.c
269         @($(LHEAD) $(LINT.c) $< $(LTAIL))
271 $(LINTS_DIR)/%.ln:              $(SRC)/common/crypto/des/%.c
272         @($(LHEAD) $(LINT.c) $< $(LTAIL))
274 $(LINTS_DIR)/%.ln:              $(SRC)/common/crypto/aes/sun4u/%.s
275         @($(LHEAD) $(LINT.s) $< $(LTAIL))
277 $(LINTS_DIR)/%.ln:              $(SRC)/common/crypto/arcfour/sun4u/%.s
278         @($(LHEAD) $(LINT.s) $< $(LTAIL))
280 $(LINTS_DIR)/%.ln:              $(SRC)/common/crypto/des/sun4u/%.s
281         @($(LHEAD) $(LINT.s) $< $(LTAIL))
283 $(LINTS_DIR)/%.ln:              $(SRC)/common/crypto/sha1/sparc/sun4u/%.s
284         @($(LHEAD) $(LINT.s) $< $(LTAIL))
286 $(LINTS_DIR)/%.ln:              $(SRC)/common/atomic/%.c
287         @($(LHEAD) $(LINT.c) $< $(LTAIL))