xref: /titanic_41/usr/src/uts/i86pc/Makefile.rules (revision ea8dc4b6d2251b437950c0056bc626b311c73c27)
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)/dtracestubs.s:	$(UNIX_O) $(LIBS)
191	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
192	    printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \
193	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
194
195$(DTRACESTUBS):	$(DTRACESTUBS_O)
196	$(BUILD.SO) $(DTRACESTUBS_O)
197
198#
199#	Section 1b: Lint `object' build rules
200#
201$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/conf/%.c
202	@($(LHEAD) $(LINT.c) $< $(LTAIL))
203
204$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.c
205	@($(LHEAD) $(LINT.c) $< $(LTAIL))
206
207$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.s
208	@($(LHEAD) $(LINT.s) $< $(LTAIL))
209
210$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.c
211	@($(LHEAD) $(LINT.c) $< $(LTAIL))
212
213$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.s
214	@($(LHEAD) $(LINT.s) $< $(LTAIL))
215
216$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/%.c
217	@($(LHEAD) $(LINT.c) $< $(LTAIL))
218
219$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/mc/%.c
220	@($(LHEAD) $(LINT.c) $< $(LTAIL))
221
222$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pci/%.c
223	@($(LHEAD) $(LINT.c) $< $(LTAIL))
224
225$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pciex/%.c
226	@($(LHEAD) $(LINT.c) $< $(LTAIL))
227
228$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pciex/hotplug/pciehpc/%.c
229	@($(LHEAD) $(LINT.c) $< $(LTAIL))
230
231$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
232	@($(LHEAD) $(LINT.c) $< $(LTAIL))
233
234$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
235	@($(LHEAD) $(LINT.s) $< $(LTAIL))
236
237$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.c
238	@($(LHEAD) $(LINT.c) $< $(LTAIL))
239
240$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.s
241	@($(LHEAD) $(LINT.s) $< $(LTAIL))
242
243$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/ml/%.s
244	@($(LHEAD) $(LINT.s) $< $(LTAIL))
245
246$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/os/%.c
247	@($(LHEAD) $(LINT.c) $< $(LTAIL))
248
249$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/vm/%.c
250	@($(LHEAD) $(LINT.c) $< $(LTAIL))
251
252$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/%.c
253	@($(LHEAD) $(LINT.c) $< $(LTAIL))
254
255$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
256	@($(LHEAD) $(LINT.c) $< $(LTAIL))
257
258$(LINTS_DIR)/%.ln:		$(SRC)/common/dis/i386/%.c
259	@($(LHEAD) $(LINT.c) $< $(LTAIL))
260
261$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/agpgart/%.c
262	@($(LHEAD) $(LINT.c) $< $(LTAIL))
263
264$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
265	@($(LHEAD) $(LINT.c) $< $(LTAIL))
266
267$(LINTS_DIR)/%.ln:		$(SRC)/common/mc/mc-amd/%.c
268	@($(LHEAD) $(LINT.c) $< $(LTAIL))
269
270$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.s
271	@($(LHEAD) $(LINT.s) $< $(LTAIL))
272
273$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.c
274	@($(LHEAD) $(LINT.c) $< $(LTAIL))
275
276$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
277	@($(LHEAD) $(LINT.c) $< $(LTAIL))
278
279$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/events/%.c
280	@($(LHEAD) $(LINT.c) $< $(LTAIL))
281
282$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
283	@($(LHEAD) $(LINT.c) $< $(LTAIL))
284
285$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
286	@($(LHEAD) $(LINT.c) $< $(LTAIL))
287
288$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
289	@($(LHEAD) $(LINT.c) $< $(LTAIL))
290
291$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
292	@($(LHEAD) $(LINT.c) $< $(LTAIL))
293
294$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
295	@($(LHEAD) $(LINT.c) $< $(LTAIL))
296
297$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
298	@($(LHEAD) $(LINT.c) $< $(LTAIL))
299
300$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
301	@($(LHEAD) $(LINT.c) $< $(LTAIL))
302
303$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
304	@($(LHEAD) $(LINT.c) $< $(LTAIL))
305
306$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/gfx_private/%.c
307	@($(LHEAD) $(LINT.c) $< $(LTAIL))
308
309