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.
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.
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]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 # Copyright 2012 Joyent, Inc. All rights reserved.
25 # Copyright 2017 Nexenta Systems, Inc.
29 # This Makefile defines all file modules and build rules for the
30 # directory uts/intel and its children. These are the source files which
31 # are specific to the intel processor.
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.
38 # Lines whose initial directory components are equal are sorted
39 # alphabetically by the remaining components.
42 # Need a way to distinguish between the ia32 and amd64 subdirs.
45 SUBARCH_DIR_64 = amd64
46 SUBARCH_DIR = $(SUBARCH_DIR_$(CLASS))
49 # Section 1: C object build rules
51 $(OBJS_DIR)/%.o: $(SRC)/common/fs/%.c
55 $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/power/%.c
59 $(OBJS_DIR)/%.o: $(SRC)/common/util/i386/%.s
62 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/brand/sn1/%.s
65 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/dtrace/%.c
69 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/dtrace/%.s
72 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/fs/%.c
76 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/ml/%.s
79 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/ia32/os/%.c
83 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/ia32/syscall/%.c
87 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/%.c
91 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/io/%.c
95 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/%.c
99 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/%.s
100 $(COMPILE.s) -o $@ $<
102 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/debugger/%.c
103 $(COMPILE.c) -o $@ $<
106 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/events/%.c
107 $(COMPILE.c) -o $@ $<
110 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/hardware/%.c
111 $(COMPILE.c) -o $@ $<
114 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/dispatcher/%.c
115 $(COMPILE.c) -o $@ $<
118 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/executer/%.c
119 $(COMPILE.c) -o $@ $<
122 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/parser/%.c
123 $(COMPILE.c) -o $@ $<
126 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/namespace/%.c
127 $(COMPILE.c) -o $@ $<
130 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/resources/%.c
131 $(COMPILE.c) -o $@ $<
134 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/tables/%.c
135 $(COMPILE.c) -o $@ $<
138 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/utilities/%.c
139 $(COMPILE.c) -o $@ $<
142 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/disassembler/%.c
143 $(COMPILE.c) -o $@ $<
146 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/agpgart/%.c
147 $(COMPILE.c) -o $@ $<
150 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/agpmaster/%.c
151 $(COMPILE.c) -o $@ $<
154 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/amd8111s/%.c
155 $(COMPILE.c) -o $@ $<
158 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/amr/%.c
159 $(COMPILE.c) -o $@ $<
162 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/drm/%.c
163 $(COMPILE.c) -o $@ $<
166 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/hotplug/pcicfg/%.c
167 $(COMPILE.c) -o $@ $<
170 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/ipmi/%.c
171 $(COMPILE.c) -o $@ $<
174 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/intel_nb5000/%.c
175 $(COMPILE.c) -o $@ $<
178 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/intel_nhm/%.c
179 $(COMPILE.c) -o $@ $<
182 $(OBJS_DIR)/%.o: $(SRC)/common/mc/mc-amd/%.c
183 $(COMPILE.c) -o $@ $<
186 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/mc-amd/%.c
187 $(COMPILE.c) -o $@ $<
190 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/pci/%.c
191 $(COMPILE.c) -o $@ $<
194 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/pciex/%.c
195 $(COMPILE.c) -o $@ $<
198 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/controller/ata/%.c
199 $(COMPILE.c) -o $@ $<
202 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/dcdev/%.c
203 $(COMPILE.c) -o $@ $<
206 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/disk/%.c
207 $(COMPILE.c) -o $@ $<
210 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/drvobj/%.c
211 $(COMPILE.c) -o $@ $<
214 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/hba/ghd/%.c
215 $(COMPILE.c) -o $@ $<
218 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dnet/%.c
219 $(COMPILE.c) -o $@ $<
222 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/scsi/adapters/arcmsr/%.c
223 $(COMPILE.c) -o $@ $<
226 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/scsi/targets/%.c
227 $(COMPILE.c) -o $@ $<
230 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/vgatext/%.c
231 $(COMPILE.c) -o $@ $<
234 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/vmxnet3s/%.c
235 $(COMPILE.c) -o $@ $<
238 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/scsi/adapters/pvscsi/%.c
239 $(COMPILE.c) -o $@ $<
242 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/os/%.c
243 $(COMPILE.c) -o $@ $<
246 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/os/%.c
247 $(COMPILE.c) -o $@ $<
250 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/pcbe/%.c
251 $(COMPILE.c) -o $@ $<
254 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/promif/%.c
255 $(COMPILE.c) -o $@ $<
258 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/syscall/%.c
259 $(COMPILE.c) -o $@ $<
262 $(OBJS_DIR)/%.o: $(SRCTOP)/kernel/os/%.c
263 $(COMPILE.c) -o $@ $<
266 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/kdi/%.c
267 $(COMPILE.c) -o $@ $<
270 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/kdi/%.s
271 $(COMPILE.s) -o $@ $<
273 $(OBJS_DIR)/%.o: $(UTSBASE)/intel/zfs/%.c
274 $(COMPILE.c) -o $@ $<
278 # krtld compiled into unix
281 KRTLD_INC_PATH = -I$(SRCTOP)/kernel/krtld
282 KRTLD_INC_PATH += -I$(SRCTOP)/arch/x86/include/sys
284 KRTLD_CPPFLAGS_32 = -DELF_TARGET_386
285 KRTLD_CPPFLAGS_64 = -DELF_TARGET_AMD64
286 KRTLD_CPPFLAGS = $(KRTLD_CPPFLAGS_$(CLASS)) -D_KRTLD
288 $(OBJS_DIR)/%.o: $(SRCTOP)/kernel/krtld/%.c
289 $(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
292 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/krtld/$(CLASS)/%.c
293 $(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
297 # _DBOOT indicates that krtld is called from a dboot ELF section
299 $(OBJS_DIR)/kobj.o := CPPFLAGS += -D_DBOOT
301 $(OBJS_DIR)/%.o: $(SRCTOP)/arch/x86/kernel/krtld/$(CLASS)/%.s
302 $(COMPILE.s) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
305 $(OBJS_DIR)/%.o: $(SRC)/common/util/$(SUBARCH_DIR)/%.c
306 $(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<