xref: /titanic_44/usr/src/uts/i86pc/Makefile.rules (revision 9df12a23948bd40cbe37ce88d84e272c3894e675)
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#pragma ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29#	This Makefile defines the build rules for the directory uts/i86pc
30#	and its children. These are the source files which are i86pc
31#	"implementation architecture" dependent.
32#
33#	The following two-level ordering must be maintained in this file.
34#	  Lines are sorted first in order of decreasing specificity based on
35#	  the first directory component.  That is, sun4u rules come before
36#	  sparc rules come before common rules.
37#
38#	  Lines whose initial directory components are equal are sorted
39#	  alphabetically by the remaining components.
40
41#
42#	Section 1a: C object build rules
43#
44$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/conf/%.c
45	$(COMPILE.c) -o $@ $<
46	$(CTFCONVERT_O)
47
48$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.c
49	$(COMPILE.c) -o $@ $<
50	$(CTFCONVERT_O)
51
52$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.s
53	$(COMPILE.s) -o $@ $<
54
55$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.c
56	$(COMPILE.c) -o $@ $<
57	$(CTFCONVERT_O)
58
59$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.s
60	$(COMPILE.s) -o $@ $<
61
62$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/%.c
63	$(COMPILE.c) -o $@ $<
64	$(CTFCONVERT_O)
65
66$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/mc/%.c
67	$(COMPILE.c) -o $@ $<
68	$(CTFCONVERT_O)
69
70$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pci/%.c
71	$(COMPILE.c) -o $@ $<
72	$(CTFCONVERT_O)
73
74$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pciex/%.c
75	$(COMPILE.c) -o $@ $<
76	$(CTFCONVERT_O)
77
78$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pciex/hotplug/pciehpc/%.c
79	$(COMPILE.c) -o $@ $<
80	$(CTFCONVERT_O)
81
82$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
83	$(COMPILE.c) -o $@ $<
84	$(CTFCONVERT_O)
85
86$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
87	$(COMPILE.s) -o $@ $<
88
89$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/psm/%.c
90	$(COMPILE.c) -o $@ $<
91	$(CTFCONVERT_O)
92
93$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/psm/%.s
94	$(COMPILE.s) -o $@ $<
95
96$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/ml/%.s
97	$(COMPILE.s) -o $@ $<
98
99$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/os/%.c
100	$(COMPILE.c) -o $@ $<
101	$(CTFCONVERT_O)
102
103$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/vm/%.c
104	$(COMPILE.c) -o $@ $<
105	$(CTFCONVERT_O)
106
107$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/%.c
108	$(COMPILE.c) -o $@ $<
109	$(CTFCONVERT_O)
110
111$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
112	$(COMPILE.c) -o $@ $<
113	$(CTFCONVERT_O)
114
115$(OBJS_DIR)/%.o:		$(SRC)/common/dis/i386/%.c
116	$(COMPILE.c) -o $@ $<
117	$(CTFCONVERT_O)
118
119$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/agpgart/%.c
120	$(COMPILE.c) -o $@ $<
121	$(CTFCONVERT_O)
122
123$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/gfx_private/%.c
124	$(COMPILE.c) -o $@ $<
125	$(CTFCONVERT_O)
126
127# ridiculous contortions ---
128ATOMIC_SUBDIR_32	= i386
129ATOMIC_SUBDIR_64	= amd64
130ATOMIC_SUBDIR		= $(ATOMIC_SUBDIR_$(CLASS))
131
132$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/$(ATOMIC_SUBDIR)/%.s
133	$(COMPILE.s) -o $@ $<
134
135$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/power/%.c
136	$(COMPILE.c) -o $@ $<
137	$(CTFCONVERT_O)
138
139$(OBJS_DIR)/%.o:		$(SRC)/common/mc/mc-amd/%.c
140	$(COMPILE.c) -o $@ $<
141	$(CTFCONVERT_O)
142
143$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/%.c
144	$(COMPILE.c) -o $@ $<
145	$(CTFCONVERT_O)
146
147$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/%.s
148	$(COMPILE.s) -o $@ $<
149
150$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
151	$(COMPILE.c) -o $@ $<
152	$(CTFCONVERT_O)
153
154$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/events/%.c
155	$(COMPILE.c) -o $@ $<
156	$(CTFCONVERT_O)
157
158$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
159	$(COMPILE.c) -o $@ $<
160	$(CTFCONVERT_O)
161
162$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
163	$(COMPILE.c) -o $@ $<
164	$(CTFCONVERT_O)
165
166$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
167	$(COMPILE.c) -o $@ $<
168	$(CTFCONVERT_O)
169
170$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
171	$(COMPILE.c) -o $@ $<
172	$(CTFCONVERT_O)
173
174$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
175	$(COMPILE.c) -o $@ $<
176	$(CTFCONVERT_O)
177
178$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
179	$(COMPILE.c) -o $@ $<
180	$(CTFCONVERT_O)
181
182$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
183	$(COMPILE.c) -o $@ $<
184	$(CTFCONVERT_O)
185
186$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
187	$(COMPILE.c) -o $@ $<
188	$(CTFCONVERT_O)
189
190$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/disassembler/%.c
191	$(COMPILE.c) -o $@ $<
192	$(CTFCONVERT_O)
193
194$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
195	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
196	    printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \
197	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
198
199$(DTRACESTUBS):	$(DTRACESTUBS_O)
200	$(BUILD.SO) $(DTRACESTUBS_O)
201
202#
203#	Section 1b: Lint `object' build rules
204#
205$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/conf/%.c
206	@($(LHEAD) $(LINT.c) $< $(LTAIL))
207
208$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.c
209	@($(LHEAD) $(LINT.c) $< $(LTAIL))
210
211$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.s
212	@($(LHEAD) $(LINT.s) $< $(LTAIL))
213
214$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.c
215	@($(LHEAD) $(LINT.c) $< $(LTAIL))
216
217$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.s
218	@($(LHEAD) $(LINT.s) $< $(LTAIL))
219
220$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/%.c
221	@($(LHEAD) $(LINT.c) $< $(LTAIL))
222
223$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/mc/%.c
224	@($(LHEAD) $(LINT.c) $< $(LTAIL))
225
226$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pci/%.c
227	@($(LHEAD) $(LINT.c) $< $(LTAIL))
228
229$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pciex/%.c
230	@($(LHEAD) $(LINT.c) $< $(LTAIL))
231
232$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pciex/hotplug/pciehpc/%.c
233	@($(LHEAD) $(LINT.c) $< $(LTAIL))
234
235$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
236	@($(LHEAD) $(LINT.c) $< $(LTAIL))
237
238$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
239	@($(LHEAD) $(LINT.s) $< $(LTAIL))
240
241$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.c
242	@($(LHEAD) $(LINT.c) $< $(LTAIL))
243
244$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.s
245	@($(LHEAD) $(LINT.s) $< $(LTAIL))
246
247$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/ml/%.s
248	@($(LHEAD) $(LINT.s) $< $(LTAIL))
249
250$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/os/%.c
251	@($(LHEAD) $(LINT.c) $< $(LTAIL))
252
253$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/vm/%.c
254	@($(LHEAD) $(LINT.c) $< $(LTAIL))
255
256$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/%.c
257	@($(LHEAD) $(LINT.c) $< $(LTAIL))
258
259$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
260	@($(LHEAD) $(LINT.c) $< $(LTAIL))
261
262$(LINTS_DIR)/%.ln:		$(SRC)/common/dis/i386/%.c
263	@($(LHEAD) $(LINT.c) $< $(LTAIL))
264
265$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/agpgart/%.c
266	@($(LHEAD) $(LINT.c) $< $(LTAIL))
267
268$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
269	@($(LHEAD) $(LINT.c) $< $(LTAIL))
270
271$(LINTS_DIR)/%.ln:		$(SRC)/common/mc/mc-amd/%.c
272	@($(LHEAD) $(LINT.c) $< $(LTAIL))
273
274$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.s
275	@($(LHEAD) $(LINT.s) $< $(LTAIL))
276
277$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.c
278	@($(LHEAD) $(LINT.c) $< $(LTAIL))
279
280$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
281	@($(LHEAD) $(LINT.c) $< $(LTAIL))
282
283$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/events/%.c
284	@($(LHEAD) $(LINT.c) $< $(LTAIL))
285
286$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
287	@($(LHEAD) $(LINT.c) $< $(LTAIL))
288
289$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
290	@($(LHEAD) $(LINT.c) $< $(LTAIL))
291
292$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
293	@($(LHEAD) $(LINT.c) $< $(LTAIL))
294
295$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
296	@($(LHEAD) $(LINT.c) $< $(LTAIL))
297
298$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
299	@($(LHEAD) $(LINT.c) $< $(LTAIL))
300
301$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
302	@($(LHEAD) $(LINT.c) $< $(LTAIL))
303
304$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
305	@($(LHEAD) $(LINT.c) $< $(LTAIL))
306
307$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
308	@($(LHEAD) $(LINT.c) $< $(LTAIL))
309
310$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/disassembler/%.c
311	@($(LHEAD) $(LINT.c) $< $(LTAIL))
312
313$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/gfx_private/%.c
314	@($(LHEAD) $(LINT.c) $< $(LTAIL))
315
316