xref: /titanic_41/usr/src/uts/i86pc/Makefile.rules (revision c5805b0b8f18ce47991b05b08dc6bedc8a549f49)
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 2005 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/io/%.c
49	$(COMPILE.c) -o $@ $<
50	$(CTFCONVERT_O)
51
52$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pci/%.c
53	$(COMPILE.c) -o $@ $<
54	$(CTFCONVERT_O)
55
56$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pciex/%.c
57	$(COMPILE.c) -o $@ $<
58	$(CTFCONVERT_O)
59
60$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pciex/hotplug/pciehpc/%.c
61	$(COMPILE.c) -o $@ $<
62	$(CTFCONVERT_O)
63
64$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
65	$(COMPILE.c) -o $@ $<
66	$(CTFCONVERT_O)
67
68$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
69	$(COMPILE.s) -o $@ $<
70
71$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/psm/%.c
72	$(COMPILE.c) -o $@ $<
73	$(CTFCONVERT_O)
74
75$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/psm/%.s
76	$(COMPILE.s) -o $@ $<
77
78$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/ml/%.s
79	$(COMPILE.s) -o $@ $<
80
81$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/os/%.c
82	$(COMPILE.c) -o $@ $<
83	$(CTFCONVERT_O)
84
85$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/vm/%.c
86	$(COMPILE.c) -o $@ $<
87	$(CTFCONVERT_O)
88
89$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/%.c
90	$(COMPILE.c) -o $@ $<
91	$(CTFCONVERT_O)
92
93$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
94	$(COMPILE.c) -o $@ $<
95	$(CTFCONVERT_O)
96
97$(OBJS_DIR)/%.o:		$(SRC)/common/dis/i386/%.c
98	$(COMPILE.c) -o $@ $<
99	$(CTFCONVERT_O)
100
101$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/agpgart/%.c
102	$(COMPILE.c) -o $@ $<
103	$(CTFCONVERT_O)
104
105$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/gfx_private/%.c
106	$(COMPILE.c) -o $@ $<
107	$(CTFCONVERT_O)
108
109# ridiculous contortions ---
110ATOMIC_SUBDIR_32	= i386
111ATOMIC_SUBDIR_64	= amd64
112ATOMIC_SUBDIR		= $(ATOMIC_SUBDIR_$(CLASS))
113
114$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/$(ATOMIC_SUBDIR)/%.s
115	$(COMPILE.s) -o $@ $<
116
117$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/power/%.c
118	$(COMPILE.c) -o $@ $<
119	$(CTFCONVERT_O)
120
121$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/%.c
122	$(COMPILE.c) -o $@ $<
123	$(CTFCONVERT_O)
124
125$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/%.s
126	$(COMPILE.s) -o $@ $<
127
128$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
129	$(COMPILE.c) -o $@ $<
130	$(CTFCONVERT_O)
131
132$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/events/%.c
133	$(COMPILE.c) -o $@ $<
134	$(CTFCONVERT_O)
135
136$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
137	$(COMPILE.c) -o $@ $<
138	$(CTFCONVERT_O)
139
140$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
141	$(COMPILE.c) -o $@ $<
142	$(CTFCONVERT_O)
143
144$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
145	$(COMPILE.c) -o $@ $<
146	$(CTFCONVERT_O)
147
148$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
149	$(COMPILE.c) -o $@ $<
150	$(CTFCONVERT_O)
151
152$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
153	$(COMPILE.c) -o $@ $<
154	$(CTFCONVERT_O)
155
156$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
157	$(COMPILE.c) -o $@ $<
158	$(CTFCONVERT_O)
159
160$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
161	$(COMPILE.c) -o $@ $<
162	$(CTFCONVERT_O)
163
164$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
165	$(COMPILE.c) -o $@ $<
166	$(CTFCONVERT_O)
167
168$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
169	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
170	    printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \
171	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
172
173$(DTRACESTUBS):	$(DTRACESTUBS_O)
174	$(BUILD.SO) $(DTRACESTUBS_O)
175
176#
177#	Section 1b: Lint `object' build rules
178#
179$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/conf/%.c
180	@($(LHEAD) $(LINT.c) $< $(LTAIL))
181
182$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/%.c
183	@($(LHEAD) $(LINT.c) $< $(LTAIL))
184
185$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pci/%.c
186	@($(LHEAD) $(LINT.c) $< $(LTAIL))
187
188$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pciex/%.c
189	@($(LHEAD) $(LINT.c) $< $(LTAIL))
190
191$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pciex/hotplug/pciehpc/%.c
192	@($(LHEAD) $(LINT.c) $< $(LTAIL))
193
194$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
195	@($(LHEAD) $(LINT.c) $< $(LTAIL))
196
197$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
198	@($(LHEAD) $(LINT.s) $< $(LTAIL))
199
200$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.c
201	@($(LHEAD) $(LINT.c) $< $(LTAIL))
202
203$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.s
204	@($(LHEAD) $(LINT.s) $< $(LTAIL))
205
206$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/ml/%.s
207	@($(LHEAD) $(LINT.s) $< $(LTAIL))
208
209$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/os/%.c
210	@($(LHEAD) $(LINT.c) $< $(LTAIL))
211
212$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/vm/%.c
213	@($(LHEAD) $(LINT.c) $< $(LTAIL))
214
215$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/%.c
216	@($(LHEAD) $(LINT.c) $< $(LTAIL))
217
218$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
219	@($(LHEAD) $(LINT.c) $< $(LTAIL))
220
221$(LINTS_DIR)/%.ln:		$(SRC)/common/dis/i386/%.c
222	@($(LHEAD) $(LINT.c) $< $(LTAIL))
223
224$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/agpgart/%.c
225	@($(LHEAD) $(LINT.c) $< $(LTAIL))
226
227$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
228	@($(LHEAD) $(LINT.c) $< $(LTAIL))
229
230$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.s
231	@($(LHEAD) $(LINT.s) $< $(LTAIL))
232
233$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.c
234	@($(LHEAD) $(LINT.c) $< $(LTAIL))
235
236$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
237	@($(LHEAD) $(LINT.c) $< $(LTAIL))
238
239$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/events/%.c
240	@($(LHEAD) $(LINT.c) $< $(LTAIL))
241
242$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
243	@($(LHEAD) $(LINT.c) $< $(LTAIL))
244
245$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
246	@($(LHEAD) $(LINT.c) $< $(LTAIL))
247
248$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
249	@($(LHEAD) $(LINT.c) $< $(LTAIL))
250
251$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
252	@($(LHEAD) $(LINT.c) $< $(LTAIL))
253
254$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
255	@($(LHEAD) $(LINT.c) $< $(LTAIL))
256
257$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
258	@($(LHEAD) $(LINT.c) $< $(LTAIL))
259
260$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
261	@($(LHEAD) $(LINT.c) $< $(LTAIL))
262
263$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
264	@($(LHEAD) $(LINT.c) $< $(LTAIL))
265
266$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/gfx_private/%.c
267	@($(LHEAD) $(LINT.c) $< $(LTAIL))
268
269