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/pciex/%.c 73 $(COMPILE.c) -o $@ $< 74 $(CTFCONVERT_O) 75 76$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/pciex/hotplug/pciehpc/%.c 77 $(COMPILE.c) -o $@ $< 78 $(CTFCONVERT_O) 79 80$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/pcplusmp/%.c 81 $(COMPILE.c) -o $@ $< 82 $(CTFCONVERT_O) 83 84$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/pcplusmp/%.s 85 $(COMPILE.s) -o $@ $< 86 87$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/psm/%.c 88 $(COMPILE.c) -o $@ $< 89 $(CTFCONVERT_O) 90 91$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/psm/%.s 92 $(COMPILE.s) -o $@ $< 93 94$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/rtls/%.c 95 $(COMPILE.c) -o $@ $< 96 $(CTFCONVERT_O) 97 98$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/spwr/%.c 99 $(COMPILE.c) -o $@ $< 100 $(CTFCONVERT_O) 101 102$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/ml/%.s 103 $(COMPILE.s) -o $@ $< 104 105$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/os/%.c 106 $(COMPILE.c) -o $@ $< 107 $(CTFCONVERT_O) 108 109$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/vm/%.c 110 $(COMPILE.c) -o $@ $< 111 $(CTFCONVERT_O) 112 113$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/%.c 114 $(COMPILE.c) -o $@ $< 115 $(CTFCONVERT_O) 116 117$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/dktp/controller/ata/%.c 118 $(COMPILE.c) -o $@ $< 119 $(CTFCONVERT_O) 120 121$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/dktp/hba/ghd/%.c 122 $(COMPILE.c) -o $@ $< 123 $(CTFCONVERT_O) 124 125$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/elxl/%.c 126 $(COMPILE.c) -o $@ $< 127 $(CTFCONVERT_O) 128 129$(OBJS_DIR)/%.o: $(UTSBASE)/common/os/%.c 130 $(COMPILE.c) -o $@ $< 131 $(CTFCONVERT_O) 132 133$(OBJS_DIR)/%.o: $(SRC)/common/dis/i386/%.c 134 $(COMPILE.c) -o $@ $< 135 $(CTFCONVERT_O) 136 137$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/agpgart/%.c 138 $(COMPILE.c) -o $@ $< 139 $(CTFCONVERT_O) 140 141$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/gfx_private/%.c 142 $(COMPILE.c) -o $@ $< 143 $(CTFCONVERT_O) 144 145# ridiculous contortions --- 146ATOMIC_SUBDIR_32 = i386 147ATOMIC_SUBDIR_64 = amd64 148ATOMIC_SUBDIR = $(ATOMIC_SUBDIR_$(CLASS)) 149 150$(OBJS_DIR)/%.o: $(SRC)/common/atomic/$(ATOMIC_SUBDIR)/%.s 151 $(COMPILE.s) -o $@ $< 152 153$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/power/%.c 154 $(COMPILE.c) -o $@ $< 155 $(CTFCONVERT_O) 156 157$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/%.c 158 $(COMPILE.c) -o $@ $< 159 $(CTFCONVERT_O) 160 161$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/%.s 162 $(COMPILE.s) -o $@ $< 163 164$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/debugger/%.c 165 $(COMPILE.c) -o $@ $< 166 $(CTFCONVERT_O) 167 168$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/events/%.c 169 $(COMPILE.c) -o $@ $< 170 $(CTFCONVERT_O) 171 172$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/hardware/%.c 173 $(COMPILE.c) -o $@ $< 174 $(CTFCONVERT_O) 175 176$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c 177 $(COMPILE.c) -o $@ $< 178 $(CTFCONVERT_O) 179 180$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c 181 $(COMPILE.c) -o $@ $< 182 $(CTFCONVERT_O) 183 184$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c 185 $(COMPILE.c) -o $@ $< 186 $(CTFCONVERT_O) 187 188$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/namespace/%.c 189 $(COMPILE.c) -o $@ $< 190 $(CTFCONVERT_O) 191 192$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/resources/%.c 193 $(COMPILE.c) -o $@ $< 194 $(CTFCONVERT_O) 195 196$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/tables/%.c 197 $(COMPILE.c) -o $@ $< 198 $(CTFCONVERT_O) 199 200$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/acpica/utilities/%.c 201 $(COMPILE.c) -o $@ $< 202 $(CTFCONVERT_O) 203 204$(OBJS_DIR)/dtracestubs.s: $(UNIX_O) $(LIBS) 205 nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \ 206 printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \ 207 $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s 208 209$(DTRACESTUBS): $(DTRACESTUBS_O) 210 $(BUILD.SO) $(DTRACESTUBS_O) 211 212# 213# Section 1b: Lint `object' build rules 214# 215$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/conf/%.c 216 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 217 218$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/%.c 219 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 220 221$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/dktp/hba/chs/%.c 222 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 223 224$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/dktp/hba/ncrs/%.c 225 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 226 227$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/iprb/%.c 228 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 229 230$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/bmc/%.c 231 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 232 233$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/pci/%.c 234 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 235 236$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/pciex/%.c 237 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 238 239$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/pciex/hotplug/pciehpc/%.c 240 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 241 242$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/pcplusmp/%.c 243 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 244 245$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/pcplusmp/%.s 246 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 247 248$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/psm/%.c 249 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 250 251$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/psm/%.s 252 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 253 254$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/rtls/%.c 255 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 256 257$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/spwr/%.c 258 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 259 260$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/ml/%.s 261 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 262 263$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/os/%.c 264 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 265 266$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/vm/%.c 267 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 268 269$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/%.c 270 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 271 272$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/dktp/controller/ata/%.c 273 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 274 275$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/dktp/hba/ghd/%.c 276 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 277 278$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/elxl/%.c 279 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 280 281$(LINTS_DIR)/%.ln: $(UTSBASE)/common/os/%.c 282 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 283 284$(LINTS_DIR)/%.ln: $(SRC)/common/dis/i386/%.c 285 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 286 287$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/agpgart/%.c 288 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 289 290$(LINTS_DIR)/%.ln: $(SRC)/common/atomic/%.c 291 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 292 293$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/%.s 294 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 295 296$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/%.c 297 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 298 299$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/debugger/%.c 300 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 301 302$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/events/%.c 303 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 304 305$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/hardware/%.c 306 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 307 308$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/interpreter/dispatcher/%.c 309 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 310 311$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/interpreter/executer/%.c 312 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 313 314$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/interpreter/parser/%.c 315 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 316 317$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/namespace/%.c 318 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 319 320$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/resources/%.c 321 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 322 323$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/tables/%.c 324 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 325 326$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/acpica/utilities/%.c 327 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 328 329$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/gfx_private/%.c 330 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 331 332