xref: /titanic_44/usr/src/uts/intel/Makefile.rules (revision b9238976491622ad75a67ab0c12edf99e36212b9)
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# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27#	This Makefile defines all file modules and build rules for the
28# directory uts/intel and its children. These are the source files which
29# are specific to the intel processor.
30#
31#	The following two-level ordering must be maintained in this file.
32#	  Lines are sorted first in order of decreasing specificity based on
33#	  the first directory component.  That is, sun4u rules come before
34#	  sparc rules come before common rules.
35#
36#	  Lines whose initial directory components are equal are sorted
37#	  alphabetically by the remaining components.
38
39#
40# Need a way to distinguish between the ia32 and amd64 subdirs.
41#
42SUBARCH_DIR_32 = ia32
43SUBARCH_DIR_64 = amd64
44SUBARCH_DIR	= $(SUBARCH_DIR_$(CLASS))
45
46#
47#	Section 1a: C object build rules
48#
49$(OBJS_DIR)/%.o:		$(SRC)/common/fs/%.c
50	$(COMPILE.c) -o $@ $<
51	$(CTFCONVERT_O)
52
53$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/power/%.c
54	$(COMPILE.c) -o $@ $<
55	$(CTFCONVERT_O)
56
57$(OBJS_DIR)/%.o:		$(SRC)/common/util/i386/%.s
58	$(COMPILE.s) -o $@ $<
59
60$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/brand/sn1/%.s
61	$(COMPILE.s) -o $@ $<
62
63$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/dtrace/%.c
64	$(COMPILE.c) -o $@ $<
65	$(CTFCONVERT_O)
66
67$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/dtrace/%.s
68	$(COMPILE.s) -o $@ $<
69
70$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/fs/proc/%.c
71	$(COMPILE.c) -o $@ $<
72	$(CTFCONVERT_O)
73
74$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/ia32/ml/%.s
75	$(COMPILE.s) -o $@ $<
76
77$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/ia32/os/%.c
78	$(COMPILE.c) -o $@ $<
79	$(CTFCONVERT_O)
80
81$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/ia32/promif/%.c
82	$(COMPILE.c) -o $@ $<
83	$(CTFCONVERT_O)
84
85$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/ia32/syscall/%.c
86	$(COMPILE.c) -o $@ $<
87	$(CTFCONVERT_O)
88
89$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/%.c
90	$(COMPILE.c) -o $@ $<
91	$(CTFCONVERT_O)
92
93$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/aac/%.c
94	$(COMPILE.c) -o $@ $<
95	$(CTFCONVERT_O)
96
97$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/%.c
98	$(COMPILE.c) -o $@ $<
99	$(CTFCONVERT_O)
100
101$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/%.s
102	$(COMPILE.s) -o $@ $<
103
104$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/debugger/%.c
105	$(COMPILE.c) -o $@ $<
106	$(CTFCONVERT_O)
107
108$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/events/%.c
109	$(COMPILE.c) -o $@ $<
110	$(CTFCONVERT_O)
111
112$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/hardware/%.c
113	$(COMPILE.c) -o $@ $<
114	$(CTFCONVERT_O)
115
116$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/interpreter/dispatcher/%.c
117	$(COMPILE.c) -o $@ $<
118	$(CTFCONVERT_O)
119
120$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/interpreter/executer/%.c
121	$(COMPILE.c) -o $@ $<
122	$(CTFCONVERT_O)
123
124$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/interpreter/parser/%.c
125	$(COMPILE.c) -o $@ $<
126	$(CTFCONVERT_O)
127
128$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/namespace/%.c
129	$(COMPILE.c) -o $@ $<
130	$(CTFCONVERT_O)
131
132$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/resources/%.c
133	$(COMPILE.c) -o $@ $<
134	$(CTFCONVERT_O)
135
136$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/tables/%.c
137	$(COMPILE.c) -o $@ $<
138	$(CTFCONVERT_O)
139
140$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/utilities/%.c
141	$(COMPILE.c) -o $@ $<
142	$(CTFCONVERT_O)
143
144$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/acpica/disassembler/%.c
145	$(COMPILE.c) -o $@ $<
146	$(CTFCONVERT_O)
147
148$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/agpgart/%.c
149	$(COMPILE.c) -o $@ $<
150	$(CTFCONVERT_O)
151
152$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/agpmaster/%.c
153	$(COMPILE.c) -o $@ $<
154	$(CTFCONVERT_O)
155
156$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/amd8111s/%.c
157	$(COMPILE.c) -o $@ $<
158	$(CTFCONVERT_O)
159
160$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/amr/%.c
161	$(COMPILE.c) -o $@ $<
162	$(CTFCONVERT_O)
163
164$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/drm/%.c
165	$(COMPILE.c) -o $@ $<
166	$(CTFCONVERT_O)
167
168$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/drm/%.s
169	$(COMPILE.s) -o $@ $<
170
171$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/hotplug/pcicfg/%.c
172	$(COMPILE.c) -o $@ $<
173	$(CTFCONVERT_O)
174
175$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/hotplug/pciehpc/%.c
176	$(COMPILE.c) -o $@ $<
177	$(CTFCONVERT_O)
178
179$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/pci/%.c
180	$(COMPILE.c) -o $@ $<
181	$(CTFCONVERT_O)
182
183$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/pciex/%.c
184	$(COMPILE.c) -o $@ $<
185	$(CTFCONVERT_O)
186
187$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/dktp/controller/ata/%.c
188	$(COMPILE.c) -o $@ $<
189	$(CTFCONVERT_O)
190
191$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/dktp/dcdev/%.c
192	$(COMPILE.c) -o $@ $<
193	$(CTFCONVERT_O)
194
195$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/dktp/disk/%.c
196	$(COMPILE.c) -o $@ $<
197	$(CTFCONVERT_O)
198
199$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/dktp/drvobj/%.c
200	$(COMPILE.c) -o $@ $<
201	$(CTFCONVERT_O)
202
203$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/dktp/hba/ghd/%.c
204	$(COMPILE.c) -o $@ $<
205	$(CTFCONVERT_O)
206
207$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/scsi/targets/%.c
208	$(COMPILE.c) -o $@ $<
209	$(CTFCONVERT_O)
210
211$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/vgatext/%.c
212	$(COMPILE.c) -o $@ $<
213	$(CTFCONVERT_O)
214
215$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/os/%.c
216	$(COMPILE.c) -o $@ $<
217	$(CTFCONVERT_O)
218
219$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/pcbe/%.c
220	$(COMPILE.c) -o $@ $<
221	$(CTFCONVERT_O)
222
223$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/promif/%.c
224	$(COMPILE.c) -o $@ $<
225	$(CTFCONVERT_O)
226
227$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/syscall/%.c
228	$(COMPILE.c) -o $@ $<
229	$(CTFCONVERT_O)
230
231$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
232	$(COMPILE.c) -o $@ $<
233	$(CTFCONVERT_O)
234
235$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/kdi/%.c
236	$(COMPILE.c) -o $@ $<
237	$(CTFCONVERT_O)
238
239$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/kdi/%.s
240	$(COMPILE.s) -o $@ $<
241
242$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/kdi/$(SUBARCH_DIR)/%.s
243	$(COMPILE.s) -o $@ $<
244
245#
246# krtld compiled into unix
247#
248
249KRTLD_INC_PATH	= -I$(UTSBASE)/common/krtld -I$(UTSBASE)/intel/sys
250KRTLD_INC_PATH	+= -I$(UTSBASE)/intel/$(SUBARCH_DIR)/krtld
251
252KRTLD_CPPFLAGS_32	= -DELF_TARGET_386
253KRTLD_CPPFLAGS_64	= -DELF_TARGET_AMD64 -DMODDIR_SUFFIX=\"amd64\"
254KRTLD_CPPFLAGS		= $(KRTLD_CPPFLAGS_$(CLASS)) -D_KRTLD
255
256$(OBJS_DIR)/%.o:	$(UTSBASE)/common/krtld/%.c
257	$(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
258	$(CTFCONVERT_O)
259
260$(OBJS_DIR)/%.o:	$(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.c
261	$(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
262	$(CTFCONVERT_O)
263
264$(OBJS_DIR)/%.o:	$(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.s
265	$(COMPILE.s) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
266	$(CTFCONVERT_O)
267
268$(OBJS_DIR)/%.o:	$(SRC)/common/util/$(SUBARCH_DIR)/%.c
269	$(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
270	$(CTFCONVERT_O)
271
272
273#
274#	Section 1b: Lint `object' build rules.
275#
276$(LINTS_DIR)/%.ln:		$(SRC)/common/fs/%.c
277	@($(LHEAD) $(LINT.c) $< $(LTAIL))
278
279$(LINTS_DIR)/%.ln:		$(SRC)/common/util/i386/%.s
280	@($(LHEAD) $(LINT.s) $< $(LTAIL))
281
282$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/brand/sn1/%.s
283	@($(LHEAD) $(LINT.s) $< $(LTAIL))
284
285$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/dtrace/%.c
286	@($(LHEAD) $(LINT.c) $< $(LTAIL))
287
288$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/dtrace/%.s
289	@($(LHEAD) $(LINT.s) $< $(LTAIL))
290
291$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/fs/proc/%.c
292	@($(LHEAD) $(LINT.c) $< $(LTAIL))
293
294$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/ia32/ml/%.s
295	@($(LHEAD) $(LINT.s) $< $(LTAIL))
296
297$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/ia32/os/%.c
298	@($(LHEAD) $(LINT.c) $< $(LTAIL))
299
300$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/ia32/promif/%.c
301	@($(LHEAD) $(LINT.c) $< $(LTAIL))
302
303$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/ia32/syscall/%.c
304	@($(LHEAD) $(LINT.c) $< $(LTAIL))
305
306$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/%.c
307	@($(LHEAD) $(LINT.c) $< $(LTAIL))
308
309$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/aac/%.c
310	@($(LHEAD) $(LINT.c) $< $(LTAIL))
311
312$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/%.s
313	@($(LHEAD) $(LINT.s) $< $(LTAIL))
314
315$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/%.c
316	@($(LHEAD) $(LINT.c) $< $(LTAIL))
317
318$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/debugger/%.c
319	@($(LHEAD) $(LINT.c) $< $(LTAIL))
320
321$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/events/%.c
322	@($(LHEAD) $(LINT.c) $< $(LTAIL))
323
324$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/hardware/%.c
325	@($(LHEAD) $(LINT.c) $< $(LTAIL))
326
327$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/interpreter/dispatcher/%.c
328	@($(LHEAD) $(LINT.c) $< $(LTAIL))
329
330$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/interpreter/executer/%.c
331	@($(LHEAD) $(LINT.c) $< $(LTAIL))
332
333$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/interpreter/parser/%.c
334	@($(LHEAD) $(LINT.c) $< $(LTAIL))
335
336$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/namespace/%.c
337	@($(LHEAD) $(LINT.c) $< $(LTAIL))
338
339$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/resources/%.c
340	@($(LHEAD) $(LINT.c) $< $(LTAIL))
341
342$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/tables/%.c
343	@($(LHEAD) $(LINT.c) $< $(LTAIL))
344
345$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/utilities/%.c
346	@($(LHEAD) $(LINT.c) $< $(LTAIL))
347
348$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/acpica/disassembler/%.c
349	@($(LHEAD) $(LINT.c) $< $(LTAIL))
350
351$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/agpgart/%.c
352	@($(LHEAD) $(LINT.c) $< $(LTAIL))
353
354$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/agpmaster/%.c
355	@($(LHEAD) $(LINT.c) $< $(LTAIL))
356
357$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/amd8111s/%.c
358	@($(LHEAD) $(LINT.c) $< $(LTAIL))
359
360$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/amr/%.c
361	@($(LHEAD) $(LINT.c) $< $(LTAIL))
362
363$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/drm/%.c
364	@($(LHEAD) $(LINT.c) $< $(LTAIL))
365
366$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/drm/%.s
367	@($(LHEAD) $(LINT.s) $< $(LTAIL))
368
369$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/hotplug/pcicfg/%.c
370	@($(LHEAD) $(LINT.c) $< $(LTAIL))
371
372$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/hotplug/pciehpc/%.c
373	@($(LHEAD) $(LINT.c) $< $(LTAIL))
374
375$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/pci/%.c
376	@($(LHEAD) $(LINT.c) $< $(LTAIL))
377
378$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/pciex/%.c
379	@($(LHEAD) $(LINT.c) $< $(LTAIL))
380
381$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/dktp/controller/ata/%.c
382	@($(LHEAD) $(LINT.c) $< $(LTAIL))
383
384$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/dktp/dcdev/%.c
385	@($(LHEAD) $(LINT.c) $< $(LTAIL))
386
387$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/dktp/disk/%.c
388	@($(LHEAD) $(LINT.c) $< $(LTAIL))
389
390$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/dktp/drvobj/%.c
391	@($(LHEAD) $(LINT.c) $< $(LTAIL))
392
393$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/dktp/hba/ghd/%.c
394	@($(LHEAD) $(LINT.c) $< $(LTAIL))
395
396$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/scsi/targets/%.c
397	@($(LHEAD) $(LINT.c) $< $(LTAIL))
398
399$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/io/vgatext/%.c
400	@($(LHEAD) $(LINT.c) $< $(LTAIL))
401
402$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/os/%.c
403	@($(LHEAD) $(LINT.c) $< $(LTAIL))
404
405$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/pcbe/%.c
406	@($(LHEAD) $(LINT.c) $< $(LTAIL))
407
408$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/promif/%.c
409	@($(LHEAD) $(LINT.c) $< $(LTAIL))
410
411$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/syscall/%.c
412	@($(LHEAD) $(LINT.c) $< $(LTAIL))
413
414$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
415	@($(LHEAD) $(LINT.c) $< $(LTAIL))
416
417$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/kdi/%.c
418	@($(LHEAD) $(LINT.c) $< $(LTAIL))
419
420$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/kdi/%.s
421	@($(LHEAD) $(LINT.s) $< $(LTAIL))
422
423$(LINTS_DIR)/%.ln:		$(UTSBASE)/intel/kdi/$(SUBARCH_DIR)/%.s
424	@($(LHEAD) $(LINT.s) $< $(LTAIL))
425
426#
427# krtld lints
428#
429$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/krtld/%.c
430	@($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
431
432$(LINTS_DIR)/%.ln:	$(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.c
433	@($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
434
435$(LINTS_DIR)/%.ln:	$(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.s
436	@($(LHEAD) $(LINT.s) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
437
438$(LINTS_DIR)/%.ln:	$(SRC)/common/util/$(SUBARCH_DIR)/%.c
439	@($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
440
441