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