xref: /illumos-gate/usr/src/uts/i86pc/Makefile.rules (revision 7c8c0b82)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
54ab75253Smrj# Common Development and Distribution License (the "License").
64ab75253Smrj# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
214ab75253Smrj
227c478bd9Sstevel@tonic-gate#
235cd376e8SJimmy Vetayases# Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
247b07063dSIgor Kozhukhov# Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
25eb00b1c8SRobert Mustacchi# Copyright 2019 Joyent, Inc.
26fe7a23c8SAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate#	This Makefile defines the build rules for the directory uts/i86pc
307c478bd9Sstevel@tonic-gate#	and its children. These are the source files which are i86pc
317c478bd9Sstevel@tonic-gate#	"implementation architecture" dependent.
327c478bd9Sstevel@tonic-gate#
337c478bd9Sstevel@tonic-gate#	The following two-level ordering must be maintained in this file.
347c478bd9Sstevel@tonic-gate#	  Lines are sorted first in order of decreasing specificity based on
35eb0cc229Sedp#	  the first directory component.  That is, i86pc rules come before
36eb0cc229Sedp#	  intel rules come before common rules.
377c478bd9Sstevel@tonic-gate#
387c478bd9Sstevel@tonic-gate#	  Lines whose initial directory components are equal are sorted
397c478bd9Sstevel@tonic-gate#	  alphabetically by the remaining components.
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gate#
427c478bd9Sstevel@tonic-gate#	Section 1a: C object build rules
437c478bd9Sstevel@tonic-gate#
447c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/conf/%.c
457c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
467c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
477c478bd9Sstevel@tonic-gate
487aec1d6eScindi$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/cpu/amd_opteron/%.c
497aec1d6eScindi	$(COMPILE.c) -o $@ $<
507aec1d6eScindi	$(CTFCONVERT_O)
517aec1d6eScindi
5220c794b3Sgavinm$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/cpu/authenticamd/%.c
5320c794b3Sgavinm	$(COMPILE.c) -o $@ $<
5420c794b3Sgavinm	$(CTFCONVERT_O)
557aec1d6eScindi
567aec1d6eScindi$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/cpu/generic_cpu/%.c
577aec1d6eScindi	$(COMPILE.c) -o $@ $<
587aec1d6eScindi	$(CTFCONVERT_O)
597aec1d6eScindi
6020c794b3Sgavinm$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/cpu/genuineintel/%.c
6120c794b3Sgavinm	$(COMPILE.c) -o $@ $<
6220c794b3Sgavinm	$(CTFCONVERT_O)
6320c794b3Sgavinm
647c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/%.c
657c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
667c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
677c478bd9Sstevel@tonic-gate
68d2ec54f7Sphitran$(OBJS_DIR)/%.o:                $(UTSBASE)/i86pc/io/acpi_drv/%.c
697b840e52Sphitran	$(COMPILE.c) -o $@ $<
707b840e52Sphitran	$(CTFCONVERT_O)
717b840e52Sphitran
72eca2601cSRandy Fishel$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/fipe/%.c
73eca2601cSRandy Fishel	$(COMPILE.c) -o $@ $<
74eca2601cSRandy Fishel	$(CTFCONVERT_O)
75eca2601cSRandy Fishel
76b72d5b75SMichael Corcoran$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpi/acpidev/%.c
77b72d5b75SMichael Corcoran	$(COMPILE.c) -o $@ $<
78b72d5b75SMichael Corcoran	$(CTFCONVERT_O)
79b72d5b75SMichael Corcoran
80b72d5b75SMichael Corcoran$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpi/acpinex/%.c
81b72d5b75SMichael Corcoran	$(COMPILE.c) -o $@ $<
82b72d5b75SMichael Corcoran	$(CTFCONVERT_O)
83b72d5b75SMichael Corcoran
84a3114836SGerry LiuSBD_IOCTL	= $(UTSBASE)/i86pc/sys/sbd_ioctl.h
85a3114836SGerry LiuDRMACH_IO	= $(UTSBASE)/i86pc/io/acpi/drmach_acpi
86a3114836SGerry LiuDRMACH_GENERR	= $(DRMACH_IO)/sbdgenerr
87a3114836SGerry LiuDR_IO		= $(UTSBASE)/i86pc/io/dr
88a3114836SGerry LiuDR_GENERR	= $(DR_IO)/sbdgenerr
89a3114836SGerry Liu
90a3114836SGerry Liu$(DRMACH_GENERR):	$(DR_IO)/sbdgenerr.pl
91a3114836SGerry Liu	$(RM) $@
92a3114836SGerry Liu	$(CAT) $(DR_IO)/sbdgenerr.pl > $@
93a3114836SGerry Liu	$(CHMOD) +x $@
94a3114836SGerry Liu
95a3114836SGerry Liu$(DRMACH_IO)/drmach_err.c:	$(DRMACH_GENERR) $(SBD_IOCTL)
96a3114836SGerry Liu	$(RM) $@
97a3114836SGerry Liu	$(DRMACH_GENERR) EX86 < $(SBD_IOCTL) > $(DRMACH_IO)/drmach_err.c
98a3114836SGerry Liu
99a3114836SGerry Liu$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/acpi/drmach_acpi/%.c
100a3114836SGerry Liu	$(COMPILE.c) -o $@ $<
101a3114836SGerry Liu	$(CTFCONVERT_O)
102a3114836SGerry Liu
1036732dbb3SVikram Hegde$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/amd_iommu/%.c
1046732dbb3SVikram Hegde	$(COMPILE.c) -o $@ $<
1056732dbb3SVikram Hegde	$(CTFCONVERT_O)
1066732dbb3SVikram Hegde
107a3114836SGerry Liu$(DR_GENERR):			$(DR_IO)/sbdgenerr.pl
108a3114836SGerry Liu	$(RM) $@
109a3114836SGerry Liu	$(CAT) $(DR_IO)/sbdgenerr.pl > $@
110a3114836SGerry Liu	$(CHMOD) +x $@
111a3114836SGerry Liu
112a3114836SGerry Liu$(DR_IO)/dr_err.c:		$(DR_GENERR) $(SBD_IOCTL)
113a3114836SGerry Liu	$(RM) $@
114a3114836SGerry Liu	$(DR_GENERR) ESBD < $(SBD_IOCTL) > $(DR_IO)/dr_err.c
115a3114836SGerry Liu
116a3114836SGerry Liu$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/dr/%.c
117a3114836SGerry Liu	$(COMPILE.c) -o $@ $<
118a3114836SGerry Liu	$(CTFCONVERT_O)
119a3114836SGerry Liu
12017169044Sbrutus$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/ioat/%.c
12117169044Sbrutus	$(COMPILE.c) -o $@ $<
12217169044Sbrutus	$(CTFCONVERT_O)
12317169044Sbrutus
1247c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pci/%.c
1257c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1267c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1277c478bd9Sstevel@tonic-gate
12870025d76Sjohnny$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pciex/%.c
12970025d76Sjohnny	$(COMPILE.c) -o $@ $<
13070025d76Sjohnny	$(CTFCONVERT_O)
13170025d76Sjohnny
13226947304SEvan Yan$(OBJS_DIR)/%.o:		$(UTSBASE)/intel/io/pciex/hotplug/%.c
13326947304SEvan Yan	$(COMPILE.c) -o $@ $<
13426947304SEvan Yan	$(CTFCONVERT_O)
13526947304SEvan Yan
1367c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pcplusmp/%.c
1377c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1387c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1397c478bd9Sstevel@tonic-gate
1407c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/pcplusmp/%.s
1417c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1427c478bd9Sstevel@tonic-gate
1437ff178cdSJimmy Vetayases$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/apix/%.c
1447ff178cdSJimmy Vetayases	$(COMPILE.c) -o $@ $<
1457ff178cdSJimmy Vetayases	$(CTFCONVERT_O)
1467ff178cdSJimmy Vetayases
1472df1fe9cSrandyf$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/ppm/%.c
1482df1fe9cSrandyf	$(COMPILE.c) -o $@ $<
1492df1fe9cSrandyf	$(CTFCONVERT_O)
1502df1fe9cSrandyf
1512df1fe9cSrandyf$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/ppm/%.s
1522df1fe9cSrandyf	$(COMPILE.s) -o $@ $<
1532df1fe9cSrandyf
1547c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/psm/%.c
1557c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1567c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1577c478bd9Sstevel@tonic-gate
1587c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/psm/%.s
1597c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1607c478bd9Sstevel@tonic-gate
1612bda830bSap$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/tzmon/%.c
1622bda830bSap	$(COMPILE.c) -o $@ $<
1632bda830bSap	$(CTFCONVERT_O)
1642bda830bSap
1657c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/ml/%.s
1667c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1677c478bd9Sstevel@tonic-gate
1687c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/os/%.c
1696a59053bSAlex Wilson	$(COMPILE.c) -_gcc=-fno-stack-protector -o $@ $<
1707c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1717c478bd9Sstevel@tonic-gate
1720e751525SEric Saxe$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/os/cpupm/%.c
1730e751525SEric Saxe	$(COMPILE.c) -o $@ $<
1740e751525SEric Saxe	$(CTFCONVERT_O)
1750e751525SEric Saxe
176ae115bc7Smrj$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/boot/%.c
177ae115bc7Smrj	$(COMPILE.c) -o $@ $<
178ae115bc7Smrj	$(CTFCONVERT_O)
179ae115bc7Smrj
1807c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/vm/%.c
1817c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1827c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1837c478bd9Sstevel@tonic-gate
1847c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/%.c
1857c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1867c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1877c478bd9Sstevel@tonic-gate
1885cff7825Smh$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/ppm/%.c
1895cff7825Smh	$(COMPILE.c) -o $@ $<
1905cff7825Smh	$(CTFCONVERT_O)
1915cff7825Smh
192c0da6274SZhi-Jun Robin Fu$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/pciex/%.c
193c0da6274SZhi-Jun Robin Fu	$(COMPILE.c) -o $@ $<
194c0da6274SZhi-Jun Robin Fu	$(CTFCONVERT_O)
195c0da6274SZhi-Jun Robin Fu
1967c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
1977c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1987c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1997c478bd9Sstevel@tonic-gate
2007c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/dis/i386/%.c
2017c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
2027c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
2037c478bd9Sstevel@tonic-gate
204fc1821feSrugrat$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/gfx_private/%.c
205fc1821feSrugrat	$(COMPILE.c) -o $@ $<
206fc1821feSrugrat	$(CTFCONVERT_O)
207fc1821feSrugrat
208ae115bc7Smrj$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/io/xsvc/%.c
20960405de4Skz	$(COMPILE.c) -o $@ $<
21060405de4Skz	$(CTFCONVERT_O)
21160405de4Skz
212349b53ddSStuart Maybee$(OBJS_DIR)/%.o:		$(UTSBASE)/common/xen/os/%.c
213349b53ddSStuart Maybee	$(COMPILE.c) -o $@ $<
214349b53ddSStuart Maybee	$(CTFCONVERT_O)
215349b53ddSStuart Maybee
2161738dd6eSToomas Soome$(OBJS_DIR)/%.o:		$(UTSBASE)/i86pc/dboot/%.c
2171738dd6eSToomas Soome	$(COMPILE.c) -o $@ $<
218*4c87aefeSPatrick Mooney	$(CTFCONVERT_O)
219*4c87aefeSPatrick Mooney
220ae115bc7Smrj#
221ae115bc7Smrj# dboot stuff is always 32 bit, linked to run with phys_addr == virt_addr
222