xref: /titanic_41/usr/src/uts/sun4u/starfire/Makefile.rules (revision e4f5a11d4a234623168c1558fcdf4341e11769e1)
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# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27#	This Makefile defines the build rules for the directory
28#	uts/sun4u/starfire and its children.
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# inline support for DR.
40#
41
42IL_CPP=$(CPP) -P -DINLINE -D_ASM $(AS_INC_PATH) \
43	$(CPP_DEFS) $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS)
44
45#
46#	Section 1a: C object build rules
47#
48
49$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/cvc/%.c
50	$(COMPILE.c) -o $@ $<
51	$(CTFCONVERT_O)
52
53$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/cvcredir/%.c
54	$(COMPILE.c) -o $@ $<
55	$(CTFCONVERT_O)
56
57DRMACH_IL=		$(OBJS_DIR)/drmach.il
58$(OBJS_DIR)/drmach.o	:= CC_XARCH_32 = -xarch=v8plusa
59$(OBJS_DIR)/drmach.o:	$(UTSBASE)/sun4u/starfire/io/drmach.c $(DRMACH_IL)
60	$(COMPILE.c) $(DRMACH_IL) -o $@ $(UTSBASE)/sun4u/starfire/io/drmach.c
61	$(CTFCONVERT_O)
62
63$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/io/%.c
64	$(COMPILE.c) -o $@ $<
65	$(CTFCONVERT_O)
66
67$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/ml/%.s
68	$(COMPILE.s) -o $@ $<
69
70$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/os/%.c
71	$(COMPILE.c) -o $@ $<
72	$(CTFCONVERT_O)
73
74STARFIRE_IO=	$(UTSBASE)/sun4u/starfire/io
75
76CLEANFILES +=	$(STARFIRE_IO)/drmach_err.c
77
78$(STARFIRE_IO)/drmach_err.c: $(SBDGENERR) $(SBD_IOCTL)
79	$(RM) $@
80	$(SBDGENERRCMD) ESTF < $(SBD_IOCTL) > $@
81
82# inline stuff
83
84CLEANFILES += $(DRMACH_IL)
85
86$(DRMACH_IL):	$(UTSBASE)/sun4u/starfire/ml/drmach.il.cpp
87	$(IL_CPP) $(UTSBASE)/sun4u/starfire/ml/drmach.il.cpp > $@
88
89#
90#	Section 1b: Lint object build rules
91#
92
93$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/cvc/%.c
94	@($(LHEAD) $(LINT.c) $< $(LTAIL))
95
96$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/cvcredir/%.c
97	@($(LHEAD) $(LINT.c) $< $(LTAIL))
98
99$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/io/%.c
100	@($(LHEAD) $(LINT.c) $< $(LTAIL))
101
102$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/ml/%.s
103	@($(LHEAD) $(LINT.s) $< $(LTAIL))
104
105$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/os/%.c
106	@($(LHEAD) $(LINT.c) $< $(LTAIL))
107