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