xref: /titanic_41/usr/src/uts/sun4v/Makefile.rules (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate#
26*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate#	This Makefile defines the build rules for the directory uts/sun4v
29*7c478bd9Sstevel@tonic-gate#	and its children. These are the source files which sun4v
30*7c478bd9Sstevel@tonic-gate#	"implementation architecture" dependent.
31*7c478bd9Sstevel@tonic-gate#
32*7c478bd9Sstevel@tonic-gate#	The following two-level ordering must be maintained in this file.
33*7c478bd9Sstevel@tonic-gate#	  Lines are sorted first in order of decreasing specificity based on
34*7c478bd9Sstevel@tonic-gate#	  the first directory component.  That is, sun4v rules come before
35*7c478bd9Sstevel@tonic-gate#	  sparc rules come before common rules.
36*7c478bd9Sstevel@tonic-gate#
37*7c478bd9Sstevel@tonic-gate#	  Lines whose initial directory components are equal are sorted
38*7c478bd9Sstevel@tonic-gate#	  alphabetically by the remaining components.
39*7c478bd9Sstevel@tonic-gate
40*7c478bd9Sstevel@tonic-gate#
41*7c478bd9Sstevel@tonic-gate#	Section 1a: C object build rules
42*7c478bd9Sstevel@tonic-gate#
43*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/cpu/%.c
44*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
45*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
46*7c478bd9Sstevel@tonic-gate
47*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/cpu/%.s
48*7c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/%.c
51*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
52*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
53*7c478bd9Sstevel@tonic-gate
54*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/ml/%.s
55*7c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
56*7c478bd9Sstevel@tonic-gate
57*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/os/%.c
58*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
59*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
60*7c478bd9Sstevel@tonic-gate
61*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/pcbe/%.c
62*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
63*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
64*7c478bd9Sstevel@tonic-gate
65*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/px/%.c
66*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
67*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
68*7c478bd9Sstevel@tonic-gate
69*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/io/ncp/%.c
70*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
71*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
72*7c478bd9Sstevel@tonic-gate
73*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.c
74*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
75*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
76*7c478bd9Sstevel@tonic-gate
77*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4v/vm/%.s
78*7c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
79*7c478bd9Sstevel@tonic-gate
80*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/ml/%.s
81*7c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
82*7c478bd9Sstevel@tonic-gate
83*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sfmmu/vm/%.c
84*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
85*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
86*7c478bd9Sstevel@tonic-gate
87*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
88*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
89*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
90*7c478bd9Sstevel@tonic-gate
91*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/common/os/%.c
92*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
93*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
94*7c478bd9Sstevel@tonic-gate
95*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/mdesc/%.c
96*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
97*7c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
98*7c478bd9Sstevel@tonic-gate
99*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(SRC)/common/atomic/sparcv9/%.s
100*7c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
101*7c478bd9Sstevel@tonic-gate
102*7c478bd9Sstevel@tonic-gate$(OBJS_DIR)/dtracestubs.s:	$(UNIX_O) $(LIBS)
103*7c478bd9Sstevel@tonic-gate	nm -u $(UNIX_O) $(LIBS) | grep __dtrace_probe_ | sort | uniq | nawk '{ \
104*7c478bd9Sstevel@tonic-gate	    printf("\t.global %s\n\t.type %s, #function\n%s:\n", \
105*7c478bd9Sstevel@tonic-gate	    $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
106*7c478bd9Sstevel@tonic-gate
107*7c478bd9Sstevel@tonic-gate$(DTRACESTUBS):	$(DTRACESTUBS_O)
108*7c478bd9Sstevel@tonic-gate	$(LD) -o $@ -G -h dtracestubs $(DTRACESTUBS_O)
109*7c478bd9Sstevel@tonic-gate
110*7c478bd9Sstevel@tonic-gate#
111*7c478bd9Sstevel@tonic-gate#	Section 1b: Lint `object' build rules
112*7c478bd9Sstevel@tonic-gate#
113*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.c
114*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
115*7c478bd9Sstevel@tonic-gate
116*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/cpu/%.s
117*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
118*7c478bd9Sstevel@tonic-gate
119*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/%.c
120*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
121*7c478bd9Sstevel@tonic-gate
122*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/px/%.c
123*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
124*7c478bd9Sstevel@tonic-gate
125*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/io/ncp/%.c
126*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
127*7c478bd9Sstevel@tonic-gate
128*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/ml/%.s
129*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
130*7c478bd9Sstevel@tonic-gate
131*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/os/%.c
132*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
133*7c478bd9Sstevel@tonic-gate
134*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/pcbe/%.c
135*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
136*7c478bd9Sstevel@tonic-gate
137*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.c
138*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
139*7c478bd9Sstevel@tonic-gate
140*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4v/vm/%.s
141*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
142*7c478bd9Sstevel@tonic-gate
143*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/ml/%.s
144*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.s) $< $(LTAIL))
145*7c478bd9Sstevel@tonic-gate
146*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sfmmu/vm/%.c
147*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
148*7c478bd9Sstevel@tonic-gate
149*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
150*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
151*7c478bd9Sstevel@tonic-gate
152*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/common/os/%.c
153*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
154*7c478bd9Sstevel@tonic-gate
155*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/mdesc/%.c
156*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
157*7c478bd9Sstevel@tonic-gate
158*7c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(SRC)/common/atomic/%.c
159*7c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
160