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 2009 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# Copyright 2019 Joyent, Inc. 25# Copyright 2017 Nexenta Systems, Inc. 26# 27 28# 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. 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# Need a way to distinguish between the ia32 and amd64 subdirs. 43# 44SUBARCH_DIR = amd64 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: $(UTSBASE)/intel/brand/sn1/%.s 58 $(COMPILE.s) -o $@ $< 59 60$(OBJS_DIR)/%.o: $(UTSBASE)/intel/brand/solaris10/%.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/os/%.c 75 $(COMPILE.c) -o $@ $< 76 $(CTFCONVERT_O) 77 78$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/%.c 79 $(COMPILE.c) -o $@ $< 80 $(CTFCONVERT_O) 81 82$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/%.c 83 $(COMPILE.c) -o $@ $< 84 $(CTFCONVERT_O) 85 86$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/%.s 87 $(COMPILE.s) -o $@ $< 88 89$(OBJS_DIR)/%.o: $(UTSBASE)/intel/ml/%.s 90 $(COMPILE.s) -o $@ $< 91 92$(OBJS_DIR)/%.o: $(SRC)/common/acpica/events/%.c 93 $(COMPILE.c) -o $@ $< 94 $(CTFCONVERT_O) 95 96$(OBJS_DIR)/%.o: $(SRC)/common/acpica/hardware/%.c 97 $(COMPILE.c) -o $@ $< 98 $(CTFCONVERT_O) 99 100$(OBJS_DIR)/%.o: $(SRC)/common/acpica/dispatcher/%.c 101 $(COMPILE.c) -o $@ $< 102 $(CTFCONVERT_O) 103 104$(OBJS_DIR)/%.o: $(SRC)/common/acpica/executer/%.c 105 $(COMPILE.c) -o $@ $< 106 $(CTFCONVERT_O) 107 108$(OBJS_DIR)/%.o: $(SRC)/common/acpica/parser/%.c 109 $(COMPILE.c) -o $@ $< 110 $(CTFCONVERT_O) 111 112$(OBJS_DIR)/%.o: $(SRC)/common/acpica/namespace/%.c 113 $(COMPILE.c) -o $@ $< 114 $(CTFCONVERT_O) 115 116$(OBJS_DIR)/%.o: $(SRC)/common/acpica/resources/%.c 117 $(COMPILE.c) -o $@ $< 118 $(CTFCONVERT_O) 119 120$(OBJS_DIR)/%.o: $(SRC)/common/acpica/tables/%.c 121 $(COMPILE.c) -o $@ $< 122 $(CTFCONVERT_O) 123 124$(OBJS_DIR)/%.o: $(SRC)/common/acpica/utilities/%.c 125 $(COMPILE.c) -o $@ $< 126 $(CTFCONVERT_O) 127 128$(OBJS_DIR)/%.o: $(SRC)/common/acpica/disassembler/%.c 129 $(COMPILE.c) -o $@ $< 130 $(CTFCONVERT_O) 131 132$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/amd8111s/%.c 133 $(COMPILE.c) -o $@ $< 134 $(CTFCONVERT_O) 135 136$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/amdf17nbdf/%.c 137 $(COMPILE.c) -o $@ $< 138 $(CTFCONVERT_O) 139 140$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/amdnbtemp/%.c 141 $(COMPILE.c) -o $@ $< 142 $(CTFCONVERT_O) 143 144$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/amdzen/%.c 145 $(COMPILE.c) -o $@ $< 146 $(CTFCONVERT_O) 147 148$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/amr/%.c 149 $(COMPILE.c) -o $@ $< 150 $(CTFCONVERT_O) 151 152$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/coretemp/%.c 153 $(COMPILE.c) -o $@ $< 154 $(CTFCONVERT_O) 155 156$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/hotplug/pcicfg/%.c 157 $(COMPILE.c) -o $@ $< 158 $(CTFCONVERT_O) 159 160$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/imc/%.c 161 $(COMPILE.c) -o $@ $< 162 $(CTFCONVERT_O) 163 164$(OBJS_DIR)/%.o: $(SRC)/common/mc/imc/%.c 165 $(COMPILE.c) -o $@ $< 166 $(CTFCONVERT_O) 167 168$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/ipmi/%.c 169 $(COMPILE.c) -o $@ $< 170 $(CTFCONVERT_O) 171 172$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/intel_nb5000/%.c 173 $(COMPILE.c) -o $@ $< 174 $(CTFCONVERT_O) 175 176$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/intel_nhm/%.c 177 $(COMPILE.c) -o $@ $< 178 $(CTFCONVERT_O) 179 180$(OBJS_DIR)/%.o: $(SRC)/common/mc/mc-amd/%.c 181 $(COMPILE.c) -o $@ $< 182 $(CTFCONVERT_O) 183 184$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/mc-amd/%.c 185 $(COMPILE.c) -o $@ $< 186 $(CTFCONVERT_O) 187 188$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/pchtemp/%.c 189 $(COMPILE.c) -o $@ $< 190 $(CTFCONVERT_O) 191 192$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/pci/%.c 193 $(COMPILE.c) -o $@ $< 194 $(CTFCONVERT_O) 195 196$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/pciex/%.c 197 $(COMPILE.c) -o $@ $< 198 $(CTFCONVERT_O) 199 200$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/controller/ata/%.c 201 $(COMPILE.c) -o $@ $< 202 $(CTFCONVERT_O) 203 204$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/dcdev/%.c 205 $(COMPILE.c) -o $@ $< 206 $(CTFCONVERT_O) 207 208$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/disk/%.c 209 $(COMPILE.c) -o $@ $< 210 $(CTFCONVERT_O) 211 212$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/drvobj/%.c 213 $(COMPILE.c) -o $@ $< 214 $(CTFCONVERT_O) 215 216$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dktp/hba/ghd/%.c 217 $(COMPILE.c) -o $@ $< 218 $(CTFCONVERT_O) 219 220$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/dnet/%.c 221 $(COMPILE.c) -o $@ $< 222 $(CTFCONVERT_O) 223 224$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/scsi/adapters/arcmsr/%.c 225 $(COMPILE.c) -o $@ $< 226 $(CTFCONVERT_O) 227 228$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/scsi/targets/%.c 229 $(COMPILE.c) -o $@ $< 230 $(CTFCONVERT_O) 231 232$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/vgatext/%.c 233 $(COMPILE.c) -o $@ $< 234 $(CTFCONVERT_O) 235 236$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/vmxnet3s/%.c 237 $(COMPILE.c) -o $@ $< 238 $(CTFCONVERT_O) 239 240$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/scsi/adapters/pvscsi/%.c 241 $(COMPILE.c) -o $@ $< 242 $(CTFCONVERT_O) 243 244$(OBJS_DIR)/%.o: $(UTSBASE)/intel/nskern/%.s 245 $(COMPILE.s) -o $@ $< 246 247$(OBJS_DIR)/%.o: $(UTSBASE)/intel/os/%.c 248 $(COMPILE.c) -o $@ $< 249 $(CTFCONVERT_O) 250 251$(OBJS_DIR)/%.o: $(UTSBASE)/intel/pcbe/%.c 252 $(COMPILE.c) -o $@ $< 253 $(CTFCONVERT_O) 254 255$(OBJS_DIR)/%.o: $(UTSBASE)/intel/promif/%.c 256 $(COMPILE.c) -o $@ $< 257 $(CTFCONVERT_O) 258 259$(OBJS_DIR)/%.o: $(UTSBASE)/intel/syscall/%.c 260 $(COMPILE.c) -o $@ $< 261 $(CTFCONVERT_O) 262 263$(OBJS_DIR)/%.o: $(UTSBASE)/common/os/%.c 264 $(COMPILE.c) -o $@ $< 265 $(CTFCONVERT_O) 266 267$(OBJS_DIR)/%.o: $(UTSBASE)/intel/kdi/%.c 268 $(COMPILE.c) -o $@ $< 269 $(CTFCONVERT_O) 270 271$(OBJS_DIR)/%.o: $(UTSBASE)/intel/kdi/%.s 272 $(COMPILE.s) -o $@ $< 273 274$(OBJS_DIR)/%.o: $(UTSBASE)/intel/zfs/%.c 275 $(COMPILE.c) -o $@ $< 276 $(CTFCONVERT_O) 277 278$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/viona/%.c 279 $(COMPILE.c) -o $@ $< 280 $(CTFCONVERT_O) 281 282# 283# krtld compiled into unix 284# 285 286KRTLD_INC_PATH = -I$(UTSBASE)/common/krtld -I$(UTSBASE)/intel/sys 287KRTLD_INC_PATH += -I$(UTSBASE)/intel/$(SUBARCH_DIR)/krtld 288 289KRTLD_CPPFLAGS = -D_KRTLD -DELF_TARGET_AMD64 -DMODDIR_SUFFIX=\"amd64\" 290 291$(OBJS_DIR)/%.o: $(UTSBASE)/common/krtld/%.c 292 $(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $< 293 $(CTFCONVERT_O) 294 295$(OBJS_DIR)/%.o: $(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.c 296 $(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $< 297 $(CTFCONVERT_O) 298 299# 300# _DBOOT indicates that krtld is called from a dboot ELF section 301# 302$(OBJS_DIR)/kobj.o := CPPFLAGS += -D_DBOOT 303 304$(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/intel/ml/%.s 305 $(DBOOT_AS) -P -D_ASM $(DBOOT_DEFS) $(DBOOT_AS_INCL) -o $@ $< 306 307 308$(OBJS_DIR)/%.o: $(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.s 309 $(COMPILE.s) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $< 310 311$(OBJS_DIR)/%.o: $(SRC)/common/util/$(SUBARCH_DIR)/%.c 312 $(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $< 313 $(CTFCONVERT_O) 314