xref: /onnv-gate/usr/src/uts/sun4u/Makefile.rules (revision 11245:28613b254aad)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
51370Sschwartz# Common Development and Distribution License (the "License").
61370Sschwartz# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
211370Sschwartz
220Sstevel@tonic-gate#
2310840SGerald.Jelinek@Sun.COM# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate# Use is subject to license terms.
250Sstevel@tonic-gate#
260Sstevel@tonic-gate#	This Makefile defines the build rules for the directory uts/sun4u
270Sstevel@tonic-gate#	and its children. These are the source files which sun4u
280Sstevel@tonic-gate#	"implementation architecture" dependent.
290Sstevel@tonic-gate#
300Sstevel@tonic-gate#	The following two-level ordering must be maintained in this file.
310Sstevel@tonic-gate#	  Lines are sorted first in order of decreasing specificity based on
320Sstevel@tonic-gate#	  the first directory component.  That is, sun4u rules come before
330Sstevel@tonic-gate#	  sparc rules come before common rules.
340Sstevel@tonic-gate#
350Sstevel@tonic-gate#	  Lines whose initial directory components are equal are sorted
360Sstevel@tonic-gate#	  alphabetically by the remaining components.
370Sstevel@tonic-gate
380Sstevel@tonic-gate#
390Sstevel@tonic-gate#	Section 1a: C object build rules
400Sstevel@tonic-gate#
410Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/cpu/%.c
420Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
430Sstevel@tonic-gate	$(CTFCONVERT_O)
440Sstevel@tonic-gate
450Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/cpu/%.s
460Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
470Sstevel@tonic-gate
481167Skupfer#
491167Skupfer# This rule for io/ppm/%.c needs to come before the io/%.c rule so that
501167Skupfer# the sun4u/ppm driver pulls in io/ppm/ppm.c instead of io/ppm.c.
511167Skupfer# Making an explicit rule to build ppm.o doesn't work because it breaks
521167Skupfer# the build of excalibur/xcalppm
531167Skupfer#
540Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/ppm/%.c
550Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
560Sstevel@tonic-gate	$(CTFCONVERT_O)
570Sstevel@tonic-gate
584667Smh27603$(OBJS_DIR)/%.o:		$(UTSBASE)/common/io/ppm/%.c
594667Smh27603	$(COMPILE.c) -o $@ $<
604667Smh27603	$(CTFCONVERT_O)
614667Smh27603
626440Sbala$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/%.s
636440Sbala	$(COMPILE.s) -o $@ $<
646440Sbala
650Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/%.c
660Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
670Sstevel@tonic-gate	$(CTFCONVERT_O)
680Sstevel@tonic-gate
690Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
700Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
710Sstevel@tonic-gate	$(CTFCONVERT_O)
720Sstevel@tonic-gate
730Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
740Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
750Sstevel@tonic-gate	$(CTFCONVERT_O)
760Sstevel@tonic-gate
770Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
780Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
790Sstevel@tonic-gate	$(CTFCONVERT_O)
800Sstevel@tonic-gate
810Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.c
820Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
830Sstevel@tonic-gate	$(CTFCONVERT_O)
840Sstevel@tonic-gate
850Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pci/%.s
860Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
870Sstevel@tonic-gate
880Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.c
890Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
900Sstevel@tonic-gate	$(CTFCONVERT_O)
910Sstevel@tonic-gate
920Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/px/%.s
930Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
940Sstevel@tonic-gate
95*11245SZhijun.Fu@Sun.COM$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pciex/%.c
96*11245SZhijun.Fu@Sun.COM	$(COMPILE.c) -o $@ $<
97*11245SZhijun.Fu@Sun.COM	$(CTFCONVERT_O)
98*11245SZhijun.Fu@Sun.COM
99*11245SZhijun.Fu@Sun.COM$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/io/pciex/%.s
100*11245SZhijun.Fu@Sun.COM	$(COMPILE.s) -o $@ $<
101*11245SZhijun.Fu@Sun.COM
1020Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/ml/%.s
1030Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1040Sstevel@tonic-gate
1050Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/os/%.c
1060Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1070Sstevel@tonic-gate	$(CTFCONVERT_O)
1080Sstevel@tonic-gate
1090Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/pcbe/%.c
1100Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1110Sstevel@tonic-gate	$(CTFCONVERT_O)
1120Sstevel@tonic-gate
1134127Sedp$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4/brand/sn1/%.s
1142712Snn35248	$(COMPILE.s) -o $@ $<
1152712Snn35248
11610840SGerald.Jelinek@Sun.COM$(OBJS_DIR)/%.o:                $(UTSBASE)/sun4/brand/solaris10/%.s
11710840SGerald.Jelinek@Sun.COM	$(COMPILE.s) -o $@ $<
11810840SGerald.Jelinek@Sun.COM
1190Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.c
1200Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1210Sstevel@tonic-gate	$(CTFCONVERT_O)
1220Sstevel@tonic-gate
1230Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/vm/%.s
1240Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1250Sstevel@tonic-gate
1260Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
1270Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1280Sstevel@tonic-gate
1290Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
1300Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1310Sstevel@tonic-gate	$(CTFCONVERT_O)
1320Sstevel@tonic-gate
1330Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
1340Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1350Sstevel@tonic-gate	$(CTFCONVERT_O)
1360Sstevel@tonic-gate
1370Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
1380Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1390Sstevel@tonic-gate	$(CTFCONVERT_O)
1400Sstevel@tonic-gate
1416557Sfr41279$(OBJS_DIR)/%.o:		$(SRC)/common/bignum/sun4u/%.s
1426557Sfr41279	$(COMPILE.s) -o $@ $<
1436557Sfr41279
1440Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/aes/%.c
1450Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1460Sstevel@tonic-gate	$(CTFCONVERT_O)
1470Sstevel@tonic-gate
1480Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/%.c
1490Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1500Sstevel@tonic-gate	$(CTFCONVERT_O)
1510Sstevel@tonic-gate
1520Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/des/%.c
1530Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1540Sstevel@tonic-gate	$(CTFCONVERT_O)
1550Sstevel@tonic-gate
1560Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/aes/sun4u/%.s
1570Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1580Sstevel@tonic-gate
1590Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/arcfour/sun4u/%.s
1600Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1610Sstevel@tonic-gate
1620Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/des/sun4u/%.s
1630Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1640Sstevel@tonic-gate
1650Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
1660Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1670Sstevel@tonic-gate
1680Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
1690Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1700Sstevel@tonic-gate
1710Sstevel@tonic-gate$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
1727144Sjmcp	$(NM) -u $(UNIX_O) $(LIBS) | $(GREP) __dtrace_probe_ | $(SORT) | \
1737144Sjmcp	    $(UNIQ) | $(NAWK) '{ \
1740Sstevel@tonic-gate	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
1750Sstevel@tonic-gate	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
1760Sstevel@tonic-gate
1770Sstevel@tonic-gate$(DTRACESTUBS):	$(DTRACESTUBS_O)
178580Swesolows	$(BUILD.SO) $(DTRACESTUBS_O)
1790Sstevel@tonic-gate
1800Sstevel@tonic-gate#
1810Sstevel@tonic-gate#	Section 1b: Lint `object' build rules
1820Sstevel@tonic-gate#
1830Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.c
1840Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
1850Sstevel@tonic-gate
1860Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/cpu/%.s
1870Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
1880Sstevel@tonic-gate
1890Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/ppm/%.c
1900Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
1910Sstevel@tonic-gate
1924667Smh27603$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/io/ppm/%.c
1934667Smh27603	@($(LHEAD) $(LINT.c) $< $(LTAIL))
1944667Smh27603
1950Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/%.c
1960Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
1970Sstevel@tonic-gate
1986440Sbala$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/%.s
1996440Sbala	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2006440Sbala
2010Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/clients/%.c
2020Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2030Sstevel@tonic-gate
2040Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/misc/%.c
2050Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2060Sstevel@tonic-gate
2070Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/i2c/nexus/%.c
2080Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2090Sstevel@tonic-gate
2100Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.c
2110Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2120Sstevel@tonic-gate
2130Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pci/%.s
2140Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2150Sstevel@tonic-gate
2160Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.c
2170Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2180Sstevel@tonic-gate
2190Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/px/%.s
2200Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2210Sstevel@tonic-gate
222*11245SZhijun.Fu@Sun.COM$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pciex/%.c
223*11245SZhijun.Fu@Sun.COM	@($(LHEAD) $(LINT.c) $< $(LTAIL))
224*11245SZhijun.Fu@Sun.COM
225*11245SZhijun.Fu@Sun.COM$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/io/pciex/%.s
226*11245SZhijun.Fu@Sun.COM	@($(LHEAD) $(LINT.s) $< $(LTAIL))
227*11245SZhijun.Fu@Sun.COM
2280Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/ml/%.s
2290Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2300Sstevel@tonic-gate
2310Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/os/%.c
2320Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2330Sstevel@tonic-gate
2340Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/pcbe/%.c
2350Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2360Sstevel@tonic-gate
2374127Sedp$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4/brand/sn1/%.s
2382712Snn35248	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2392712Snn35248
24010840SGerald.Jelinek@Sun.COM$(LINTS_DIR)/%.ln:              $(UTSBASE)/sun4/brand/solaris10/%.s
24110840SGerald.Jelinek@Sun.COM	@($(LHEAD) $(LINT.s) $< $(LTAIL))
24210840SGerald.Jelinek@Sun.COM
2430Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.c
2440Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2450Sstevel@tonic-gate
2460Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/vm/%.s
2470Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2480Sstevel@tonic-gate
2490Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
2500Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2510Sstevel@tonic-gate
2520Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
2530Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2540Sstevel@tonic-gate
2550Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
2560Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2570Sstevel@tonic-gate
2580Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
2590Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2600Sstevel@tonic-gate
2616557Sfr41279$(LINTS_DIR)/%.ln:		$(SRC)/common/bignum/sun4u/%.s
2626557Sfr41279	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2636557Sfr41279
2640Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/%.c
2650Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2660Sstevel@tonic-gate
2670Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/%.c
2680Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2690Sstevel@tonic-gate
2700Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/%.c
2710Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
2720Sstevel@tonic-gate
2730Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/aes/sun4u/%.s
2740Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2750Sstevel@tonic-gate
2760Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/arcfour/sun4u/%.s
2770Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2780Sstevel@tonic-gate
2790Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/des/sun4u/%.s
2800Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2810Sstevel@tonic-gate
2820Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/crypto/sha1/sparc/sun4u/%.s
2830Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
2840Sstevel@tonic-gate
2850Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
2860Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
287