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 2007 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28# This Makefile defines the build rules for the directory uts/sun4u 29# and its children. These are the source files which sun4u 30# "implementation architecture" dependent. 31# 32# The following two-level ordering must be maintained in this file. 33# Lines are sorted first in order of decreasing specificity based on 34# the first directory component. That is, sun4u rules come before 35# sparc rules come before common rules. 36# 37# Lines whose initial directory components are equal are sorted 38# alphabetically by the remaining components. 39 40# 41# Section 1a: C object build rules 42# 43$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/cpu/%.c 44 $(COMPILE.c) -o $@ $< 45 $(CTFCONVERT_O) 46 47$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/cpu/%.s 48 $(COMPILE.s) -o $@ $< 49 50# 51# This rule for io/ppm/%.c needs to come before the io/%.c rule so that 52# the sun4u/ppm driver pulls in io/ppm/ppm.c instead of io/ppm.c. 53# Making an explicit rule to build ppm.o doesn't work because it breaks 54# the build of excalibur/xcalppm 55# 56$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/ppm/%.c 57 $(COMPILE.c) -o $@ $< 58 $(CTFCONVERT_O) 59 60$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/%.c 61 $(COMPILE.c) -o $@ $< 62 $(CTFCONVERT_O) 63 64$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/i2c/clients/%.c 65 $(COMPILE.c) -o $@ $< 66 $(CTFCONVERT_O) 67 68$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/i2c/misc/%.c 69 $(COMPILE.c) -o $@ $< 70 $(CTFCONVERT_O) 71 72$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/i2c/nexus/%.c 73 $(COMPILE.c) -o $@ $< 74 $(CTFCONVERT_O) 75 76$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/pci/%.c 77 $(COMPILE.c) -o $@ $< 78 $(CTFCONVERT_O) 79 80$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/pci/%.s 81 $(COMPILE.s) -o $@ $< 82 83$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/px/%.c 84 $(COMPILE.c) -o $@ $< 85 $(CTFCONVERT_O) 86 87$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/fpc/%.c 88 $(COMPILE.c) -o $@ $< 89 $(CTFCONVERT_O) 90 91$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/px/%.s 92 $(COMPILE.s) -o $@ $< 93 94$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/wrsm/%.c 95 $(COMPILE.c) -o $@ $< 96 $(CTFCONVERT_O) 97 98$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/wrsm/%.s 99 $(COMPILE.s) -o $@ $< 100 101$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/dmfe/%.c 102 $(COMPILE.c) -o $@ $< 103 $(CTFCONVERT_O) 104 105$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/ml/%.s 106 $(COMPILE.s) -o $@ $< 107 108$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/os/%.c 109 $(COMPILE.c) -o $@ $< 110 $(CTFCONVERT_O) 111 112$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/pcbe/%.c 113 $(COMPILE.c) -o $@ $< 114 $(CTFCONVERT_O) 115 116$(OBJS_DIR)/%.o: $(UTSBASE)/sun4/brand/sn1/%.s 117 $(COMPILE.s) -o $@ $< 118 119$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/vm/%.c 120 $(COMPILE.c) -o $@ $< 121 $(CTFCONVERT_O) 122 123$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/vm/%.s 124 $(COMPILE.s) -o $@ $< 125 126$(OBJS_DIR)/%.o: $(UTSBASE)/sfmmu/ml/%.s 127 $(COMPILE.s) -o $@ $< 128 129$(OBJS_DIR)/%.o: $(UTSBASE)/sfmmu/vm/%.c 130 $(COMPILE.c) -o $@ $< 131 $(CTFCONVERT_O) 132 133$(OBJS_DIR)/%.o: $(UTSBASE)/sparc/os/%.c 134 $(COMPILE.c) -o $@ $< 135 $(CTFCONVERT_O) 136 137$(OBJS_DIR)/%.o: $(UTSBASE)/common/os/%.c 138 $(COMPILE.c) -o $@ $< 139 $(CTFCONVERT_O) 140 141$(OBJS_DIR)/%.o: $(SRC)/common/crypto/aes/%.c 142 $(COMPILE.c) -o $@ $< 143 $(CTFCONVERT_O) 144 145$(OBJS_DIR)/%.o: $(SRC)/common/crypto/arcfour/%.c 146 $(COMPILE.c) -o $@ $< 147 $(CTFCONVERT_O) 148 149$(OBJS_DIR)/%.o: $(SRC)/common/crypto/des/%.c 150 $(COMPILE.c) -o $@ $< 151 $(CTFCONVERT_O) 152 153$(OBJS_DIR)/%.o: $(SRC)/common/crypto/aes/sun4u/%.s 154 $(COMPILE.s) -o $@ $< 155 156$(OBJS_DIR)/%.o: $(SRC)/common/crypto/arcfour/sun4u/%.s 157 $(COMPILE.s) -o $@ $< 158 159$(OBJS_DIR)/%.o: $(SRC)/common/crypto/des/sun4u/%.s 160 $(COMPILE.s) -o $@ $< 161 162$(OBJS_DIR)/%.o: $(SRC)/common/crypto/sha1/sparc/sun4u/%.s 163 $(COMPILE.s) -o $@ $< 164 165$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/rsa/%.s 166 $(COMPILE.s) -o $@ $< 167 168$(OBJS_DIR)/%.o: $(SRC)/common/atomic/sparcv9/%.s 169 $(COMPILE.s) -o $@ $< 170 171KMECHKRB5_BASE=$(UTSBASE)/common/gssapi/mechs/krb5 172 173$(OBJS_DIR)/%.o: $(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.c 174 $(COMPILE.c) -o $@ $< 175 $(CTFCONVERT_O) 176 177$(OBJS_DIR)/%.o: $(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.s 178 $(COMPILE.s) -o $@ $< 179 180$(OBJS_DIR)/dtracestubs.s: $(UNIX_O) $(LIBS) 181 nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \ 182 printf("\t.global %s\n\t.type %s, #function\n%s:\n", \ 183 $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s 184 185$(DTRACESTUBS): $(DTRACESTUBS_O) 186 $(BUILD.SO) $(DTRACESTUBS_O) 187 188# 189# Section 1b: Lint `object' build rules 190# 191$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/cpu/%.c 192 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 193 194$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/cpu/%.s 195 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 196 197$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/ppm/%.c 198 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 199 200$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/%.c 201 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 202 203$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/i2c/clients/%.c 204 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 205 206$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/i2c/misc/%.c 207 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 208 209$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/i2c/nexus/%.c 210 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 211 212$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/pci/%.c 213 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 214 215$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/pci/%.s 216 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 217 218$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/px/%.c 219 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 220 221$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/px/%.s 222 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 223 224$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/fpc/%.c 225 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 226 227$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/wrsm/%.c 228 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 229 230$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/wrsm/%.s 231 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 232 233$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/dmfe/%.c 234 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 235 236$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/ml/%.s 237 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 238 239$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/os/%.c 240 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 241 242$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/pcbe/%.c 243 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 244 245$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4/brand/sn1/%.s 246 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 247 248$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/vm/%.c 249 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 250 251$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/vm/%.s 252 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 253 254$(LINTS_DIR)/%.ln: $(UTSBASE)/sfmmu/ml/%.s 255 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 256 257$(LINTS_DIR)/%.ln: $(UTSBASE)/sfmmu/vm/%.c 258 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 259 260$(LINTS_DIR)/%.ln: $(UTSBASE)/sparc/os/%.c 261 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 262 263$(LINTS_DIR)/%.ln: $(UTSBASE)/common/os/%.c 264 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 265 266$(LINTS_DIR)/%.ln: $(SRC)/common/crypto/aes/%.c 267 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 268 269$(LINTS_DIR)/%.ln: $(SRC)/common/crypto/arcfour/%.c 270 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 271 272$(LINTS_DIR)/%.ln: $(SRC)/common/crypto/des/%.c 273 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 274 275$(LINTS_DIR)/%.ln: $(SRC)/common/crypto/aes/sun4u/%.s 276 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 277 278$(LINTS_DIR)/%.ln: $(SRC)/common/crypto/arcfour/sun4u/%.s 279 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 280 281$(LINTS_DIR)/%.ln: $(SRC)/common/crypto/des/sun4u/%.s 282 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 283 284$(LINTS_DIR)/%.ln: $(SRC)/common/crypto/sha1/sparc/sun4u/%.s 285 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 286 287$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/rsa/%.s 288 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 289 290$(LINTS_DIR)/%.ln: $(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.c 291 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 292 293$(LINTS_DIR)/%.ln: $(KMECHKRB5_BASE)/crypto/des/sparc/sun4u/%.s 294 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 295 296$(LINTS_DIR)/%.ln: $(SRC)/common/atomic/%.c 297 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 298