xref: /illumos-gate/usr/src/uts/i86pc/Makefile.rules (revision bdcaf82257ab2deb6b46efaaa4bc93a1a44b3885)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
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/dktp/hba/chs/%.c
53	$(COMPILE.c) -o $@ $<
54	$(CTFCONVERT_O)
55
56$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/dktp/hba/ncrs/%.c
57	$(COMPILE.c) -o $@ $<
58	$(CTFCONVERT_O)
59
60$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/iprb/%.c
61	$(COMPILE.c) -o $@ $<
62	$(CTFCONVERT_O)
63
64$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/bmc/%.c
65	$(COMPILE.c) -o $@ $<
66	$(CTFCONVERT_O)
67
68$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pci/%.c
69	$(COMPILE.c) -o $@ $<
70	$(CTFCONVERT_O)
71
72$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
73	$(COMPILE.c) -o $@ $<
74	$(CTFCONVERT_O)
75
76$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
77	$(COMPILE.s) -o $@ $<
78
79$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/psm/%.c
80	$(COMPILE.c) -o $@ $<
81	$(CTFCONVERT_O)
82
83$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/psm/%.s
84	$(COMPILE.s) -o $@ $<
85
86$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/rtls/%.c
87	$(COMPILE.c) -o $@ $<
88	$(CTFCONVERT_O)
89
90$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/spwr/%.c
91	$(COMPILE.c) -o $@ $<
92	$(CTFCONVERT_O)
93
94$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/ml/%.s
95	$(COMPILE.s) -o $@ $<
96
97$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/os/%.c
98	$(COMPILE.c) -o $@ $<
99	$(CTFCONVERT_O)
100
101$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/vm/%.c
102	$(COMPILE.c) -o $@ $<
103	$(CTFCONVERT_O)
104
105$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/%.c
106	$(COMPILE.c) -o $@ $<
107	$(CTFCONVERT_O)
108
109$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/dktp/controller/ata/%.c
110	$(COMPILE.c) -o $@ $<
111	$(CTFCONVERT_O)
112
113$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/dktp/hba/ghd/%.c
114	$(COMPILE.c) -o $@ $<
115	$(CTFCONVERT_O)
116
117$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/elxl/%.c
118	$(COMPILE.c) -o $@ $<
119	$(CTFCONVERT_O)
120
121$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
122	$(COMPILE.c) -o $@ $<
123	$(CTFCONVERT_O)
124
125$(OBJS_DIR)/%.o:		$(SRC)/common/dis/i386/%.c
126	$(COMPILE.c) -o $@ $<
127	$(CTFCONVERT_O)
128
129$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/agpgart/%.c
130	$(COMPILE.c) -o $@ $<
131	$(CTFCONVERT_O)
132
133# ridiculous contortions ---
134ATOMIC_SUBDIR_32	= i386
135ATOMIC_SUBDIR_64	= amd64
136ATOMIC_SUBDIR		= $(ATOMIC_SUBDIR_$(CLASS))
137
138$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/$(ATOMIC_SUBDIR)/%.s
139	$(COMPILE.s) -o $@ $<
140
141$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/power/%.c
142	$(COMPILE.c) -o $@ $<
143	$(CTFCONVERT_O)
144
145$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/%.c
146	$(COMPILE.c) -o $@ $<
147	$(CTFCONVERT_O)
148
149$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/%.s
150	$(COMPILE.s) -o $@ $<
151
152$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
153	$(COMPILE.c) -o $@ $<
154	$(CTFCONVERT_O)
155
156$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/events/%.c
157	$(COMPILE.c) -o $@ $<
158	$(CTFCONVERT_O)
159
160$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
161	$(COMPILE.c) -o $@ $<
162	$(CTFCONVERT_O)
163
164$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
165	$(COMPILE.c) -o $@ $<
166	$(CTFCONVERT_O)
167
168$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
169	$(COMPILE.c) -o $@ $<
170	$(CTFCONVERT_O)
171
172$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
173	$(COMPILE.c) -o $@ $<
174	$(CTFCONVERT_O)
175
176$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
177	$(COMPILE.c) -o $@ $<
178	$(CTFCONVERT_O)
179
180$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
181	$(COMPILE.c) -o $@ $<
182	$(CTFCONVERT_O)
183
184$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
185	$(COMPILE.c) -o $@ $<
186	$(CTFCONVERT_O)
187
188$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
189	$(COMPILE.c) -o $@ $<
190	$(CTFCONVERT_O)
191
192$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
193	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
194	    printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \
195	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
196
197$(DTRACESTUBS):	$(DTRACESTUBS_O)
198	$(BUILD.SO) $(DTRACESTUBS_O)
199
200#
201#	Section 1b: Lint `object' build rules
202#
203$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/conf/%.c
204	@($(LHEAD) $(LINT.c) $< $(LTAIL))
205
206$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/%.c
207	@($(LHEAD) $(LINT.c) $< $(LTAIL))
208
209$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/dktp/hba/chs/%.c
210	@($(LHEAD) $(LINT.c) $< $(LTAIL))
211
212$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/dktp/hba/ncrs/%.c
213	@($(LHEAD) $(LINT.c) $< $(LTAIL))
214
215$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/iprb/%.c
216	@($(LHEAD) $(LINT.c) $< $(LTAIL))
217
218$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/bmc/%.c
219	@($(LHEAD) $(LINT.c) $< $(LTAIL))
220
221$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pci/%.c
222	@($(LHEAD) $(LINT.c) $< $(LTAIL))
223
224$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
225	@($(LHEAD) $(LINT.c) $< $(LTAIL))
226
227$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
228	@($(LHEAD) $(LINT.s) $< $(LTAIL))
229
230$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.c
231	@($(LHEAD) $(LINT.c) $< $(LTAIL))
232
233$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/psm/%.s
234	@($(LHEAD) $(LINT.s) $< $(LTAIL))
235
236$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/rtls/%.c
237	@($(LHEAD) $(LINT.s) $< $(LTAIL))
238
239$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/spwr/%.c
240	@($(LHEAD) $(LINT.c) $< $(LTAIL))
241
242$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/ml/%.s
243	@($(LHEAD) $(LINT.s) $< $(LTAIL))
244
245$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/os/%.c
246	@($(LHEAD) $(LINT.c) $< $(LTAIL))
247
248$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/vm/%.c
249	@($(LHEAD) $(LINT.c) $< $(LTAIL))
250
251$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/%.c
252	@($(LHEAD) $(LINT.c) $< $(LTAIL))
253
254$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/dktp/controller/ata/%.c
255	@($(LHEAD) $(LINT.c) $< $(LTAIL))
256
257$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/dktp/hba/ghd/%.c
258	@($(LHEAD) $(LINT.c) $< $(LTAIL))
259
260$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/elxl/%.c
261	@($(LHEAD) $(LINT.c) $< $(LTAIL))
262
263$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
264	@($(LHEAD) $(LINT.c) $< $(LTAIL))
265
266$(LINTS_DIR)/%.ln:		$(SRC)/common/dis/i386/%.c
267	@($(LHEAD) $(LINT.c) $< $(LTAIL))
268
269$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/agpgart/%.c
270	@($(LHEAD) $(LINT.c) $< $(LTAIL))
271
272$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
273	@($(LHEAD) $(LINT.c) $< $(LTAIL))
274
275$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.s
276	@($(LHEAD) $(LINT.s) $< $(LTAIL))
277
278$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/%.c
279	@($(LHEAD) $(LINT.c) $< $(LTAIL))
280
281$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/debugger/%.c
282	@($(LHEAD) $(LINT.c) $< $(LTAIL))
283
284$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/events/%.c
285	@($(LHEAD) $(LINT.c) $< $(LTAIL))
286
287$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/hardware/%.c
288	@($(LHEAD) $(LINT.c) $< $(LTAIL))
289
290$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c
291	@($(LHEAD) $(LINT.c) $< $(LTAIL))
292
293$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c
294	@($(LHEAD) $(LINT.c) $< $(LTAIL))
295
296$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c
297	@($(LHEAD) $(LINT.c) $< $(LTAIL))
298
299$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/namespace/%.c
300	@($(LHEAD) $(LINT.c) $< $(LTAIL))
301
302$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/resources/%.c
303	@($(LHEAD) $(LINT.c) $< $(LTAIL))
304
305$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/tables/%.c
306	@($(LHEAD) $(LINT.c) $< $(LTAIL))
307
308$(LINTS_DIR)/%.ln:		$(UTSBASE)/i86pc/io/acpica/utilities/%.c
309	@($(LHEAD) $(LINT.c) $< $(LTAIL))
310
311