xref: /titanic_44/usr/src/uts/i86pc/Makefile.rules (revision 18c2aff776a775d34a4c9893a4c72e0434d68e36)
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
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/io/tzmon/%.c
97	$(COMPILE.c) -o $@ $<
98	$(CTFCONVERT_O)
99
100$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/ml/%.s
101	$(COMPILE.s) -o $@ $<
102
103$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/os/%.c
104	$(COMPILE.c) -o $@ $<
105	$(CTFCONVERT_O)
106
107$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/vm/%.c
108	$(COMPILE.c) -o $@ $<
109	$(CTFCONVERT_O)
110
111$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/%.c
112	$(COMPILE.c) -o $@ $<
113	$(CTFCONVERT_O)
114
115$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
116	$(COMPILE.c) -o $@ $<
117	$(CTFCONVERT_O)
118
119$(OBJS_DIR)/%.o:		$(SRC)/common/dis/i386/%.c
120	$(COMPILE.c) -o $@ $<
121	$(CTFCONVERT_O)
122
123$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/agpgart/%.c
124	$(COMPILE.c) -o $@ $<
125	$(CTFCONVERT_O)
126
127$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/gfx_private/%.c
128	$(COMPILE.c) -o $@ $<
129	$(CTFCONVERT_O)
130
131$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/agpmaster/%.c
132	$(COMPILE.c) -o $@ $<
133	$(CTFCONVERT_O)
134
135$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/drm/%.c
136	$(COMPILE.c) -o $@ $<
137	$(CTFCONVERT_O)
138
139$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/drm/%.s
140	$(COMPILE.s) -o $@ $<
141
142# ridiculous contortions ---
143ATOMIC_SUBDIR_32	= i386
144ATOMIC_SUBDIR_64	= amd64
145ATOMIC_SUBDIR		= $(ATOMIC_SUBDIR_$(CLASS))
146
147$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/$(ATOMIC_SUBDIR)/%.s
148	$(COMPILE.s) -o $@ $<
149
150$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/power/%.c
151	$(COMPILE.c) -o $@ $<
152	$(CTFCONVERT_O)
153
154$(OBJS_DIR)/%.o:		$(SRC)/common/mc/mc-amd/%.c
155	$(COMPILE.c) -o $@ $<
156	$(CTFCONVERT_O)
157
158$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/%.c
159	$(COMPILE.c) -o $@ $<
160	$(CTFCONVERT_O)
161
162$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/%.s
163	$(COMPILE.s) -o $@ $<
164
165$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
166	$(COMPILE.c) -o $@ $<
167	$(CTFCONVERT_O)
168
169$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/events/%.c
170	$(COMPILE.c) -o $@ $<
171	$(CTFCONVERT_O)
172
173$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
174	$(COMPILE.c) -o $@ $<
175	$(CTFCONVERT_O)
176
177$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
178	$(COMPILE.c) -o $@ $<
179	$(CTFCONVERT_O)
180
181$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
182	$(COMPILE.c) -o $@ $<
183	$(CTFCONVERT_O)
184
185$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
186	$(COMPILE.c) -o $@ $<
187	$(CTFCONVERT_O)
188
189$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
190	$(COMPILE.c) -o $@ $<
191	$(CTFCONVERT_O)
192
193$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
194	$(COMPILE.c) -o $@ $<
195	$(CTFCONVERT_O)
196
197$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
198	$(COMPILE.c) -o $@ $<
199	$(CTFCONVERT_O)
200
201$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
202	$(COMPILE.c) -o $@ $<
203	$(CTFCONVERT_O)
204
205$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/disassembler/%.c
206	$(COMPILE.c) -o $@ $<
207	$(CTFCONVERT_O)
208
209$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
210	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
211	    printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \
212	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
213
214$(DTRACESTUBS):	$(DTRACESTUBS_O)
215	$(BUILD.SO) $(DTRACESTUBS_O)
216
217#
218#	Section 1b: Lint `object' build rules
219#
220$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/conf/%.c
221	@($(LHEAD) $(LINT.c) $< $(LTAIL))
222
223$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.c
224	@($(LHEAD) $(LINT.c) $< $(LTAIL))
225
226$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.s
227	@($(LHEAD) $(LINT.s) $< $(LTAIL))
228
229$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.c
230	@($(LHEAD) $(LINT.c) $< $(LTAIL))
231
232$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.s
233	@($(LHEAD) $(LINT.s) $< $(LTAIL))
234
235$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/%.c
236	@($(LHEAD) $(LINT.c) $< $(LTAIL))
237
238$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/mc/%.c
239	@($(LHEAD) $(LINT.c) $< $(LTAIL))
240
241$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pci/%.c
242	@($(LHEAD) $(LINT.c) $< $(LTAIL))
243
244$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pciex/%.c
245	@($(LHEAD) $(LINT.c) $< $(LTAIL))
246
247$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pciex/hotplug/pciehpc/%.c
248	@($(LHEAD) $(LINT.c) $< $(LTAIL))
249
250$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
251	@($(LHEAD) $(LINT.c) $< $(LTAIL))
252
253$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
254	@($(LHEAD) $(LINT.s) $< $(LTAIL))
255
256$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.c
257	@($(LHEAD) $(LINT.c) $< $(LTAIL))
258
259$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.s
260	@($(LHEAD) $(LINT.s) $< $(LTAIL))
261
262$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/tzmon/%.c
263	@($(LHEAD) $(LINT.c) $< $(LTAIL))
264
265$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/ml/%.s
266	@($(LHEAD) $(LINT.s) $< $(LTAIL))
267
268$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/os/%.c
269	@($(LHEAD) $(LINT.c) $< $(LTAIL))
270
271$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/vm/%.c
272	@($(LHEAD) $(LINT.c) $< $(LTAIL))
273
274$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/%.c
275	@($(LHEAD) $(LINT.c) $< $(LTAIL))
276
277$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
278	@($(LHEAD) $(LINT.c) $< $(LTAIL))
279
280$(LINTS_DIR)/%.ln:		$(SRC)/common/dis/i386/%.c
281	@($(LHEAD) $(LINT.c) $< $(LTAIL))
282
283$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/agpgart/%.c
284	@($(LHEAD) $(LINT.c) $< $(LTAIL))
285
286$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
287	@($(LHEAD) $(LINT.c) $< $(LTAIL))
288
289$(LINTS_DIR)/%.ln:		$(SRC)/common/mc/mc-amd/%.c
290	@($(LHEAD) $(LINT.c) $< $(LTAIL))
291
292$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.s
293	@($(LHEAD) $(LINT.s) $< $(LTAIL))
294
295$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.c
296	@($(LHEAD) $(LINT.c) $< $(LTAIL))
297
298$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
299	@($(LHEAD) $(LINT.c) $< $(LTAIL))
300
301$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/events/%.c
302	@($(LHEAD) $(LINT.c) $< $(LTAIL))
303
304$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
305	@($(LHEAD) $(LINT.c) $< $(LTAIL))
306
307$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
308	@($(LHEAD) $(LINT.c) $< $(LTAIL))
309
310$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
311	@($(LHEAD) $(LINT.c) $< $(LTAIL))
312
313$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
314	@($(LHEAD) $(LINT.c) $< $(LTAIL))
315
316$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
317	@($(LHEAD) $(LINT.c) $< $(LTAIL))
318
319$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
320	@($(LHEAD) $(LINT.c) $< $(LTAIL))
321
322$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
323	@($(LHEAD) $(LINT.c) $< $(LTAIL))
324
325$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
326	@($(LHEAD) $(LINT.c) $< $(LTAIL))
327
328$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/disassembler/%.c
329	@($(LHEAD) $(LINT.c) $< $(LTAIL))
330
331$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/gfx_private/%.c
332	@($(LHEAD) $(LINT.c) $< $(LTAIL))
333
334$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/agpmaster/%.c
335	@($(LHEAD) $(LINT.c) $< $(LTAIL))
336
337$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/drm/%.c
338	@($(LHEAD) $(LINT.c) $< $(LTAIL))
339
340$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/drm/%.s
341	@($(LHEAD) $(LINT.s) $< $(LTAIL))
342
343