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