xref: /titanic_50/usr/src/uts/sun4u/starfire/Makefile.rules (revision 554ff184129088135ad2643c1c9832174a17be88)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 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
29#	uts/sun4u/starfire and its children.
30#
31#	The following two-level ordering must be maintained in this file.
32#	  Lines are sorted first in order of decreasing specificity based on
33#	  the first directory component.  That is, sun4u rules come before
34#	  sparc rules come before common rules.
35#
36#	  Lines whose initial directory components are equal are sorted
37#	  alphabetically by the remaining components.
38
39#
40# inline support for DR.
41#
42
43IL_CPP=$(CPP) -P -DINLINE -D_ASM $(AS_INC_PATH) \
44	$(CPP_DEFS) $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS)
45
46#
47#	Section 1a: C object build rules
48#
49
50$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/cvc/%.c
51	$(COMPILE.c) -o $@ $<
52	$(CTFCONVERT_O)
53
54$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/cvcredir/%.c
55	$(COMPILE.c) -o $@ $<
56	$(CTFCONVERT_O)
57
58DRMACH_IL=		$(OBJS_DIR)/drmach.il
59$(OBJS_DIR)/drmach.o	:= CC_XARCH_32 = -xarch=v8plusa
60$(OBJS_DIR)/drmach.o:	$(UTSBASE)/sun4u/starfire/io/drmach.c $(DRMACH_IL)
61	$(COMPILE.c) $(DRMACH_IL) -o $@ $(UTSBASE)/sun4u/starfire/io/drmach.c
62	$(CTFCONVERT_O)
63
64$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/io/%.c
65	$(COMPILE.c) -o $@ $<
66	$(CTFCONVERT_O)
67
68$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/ml/%.s
69	$(COMPILE.s) -o $@ $<
70
71$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starfire/os/%.c
72	$(COMPILE.c) -o $@ $<
73	$(CTFCONVERT_O)
74
75STARFIRE_IO=	$(UTSBASE)/sun4u/starfire/io
76
77CLEANFILES +=	$(STARFIRE_IO)/drmach_err.c
78
79$(STARFIRE_IO)/drmach_err.c: $(SBDGENERR) $(SBD_IOCTL)
80	$(RM) $@
81	$(SBDGENERR) ESTF < $(SBD_IOCTL) > $@
82
83# inline stuff
84
85CLEANFILES += $(DRMACH_IL)
86
87$(DRMACH_IL):	$(UTSBASE)/sun4u/starfire/ml/drmach.il.cpp
88	$(IL_CPP) $(UTSBASE)/sun4u/starfire/ml/drmach.il.cpp > $@
89
90#
91#	Section 1b: Lint object build rules
92#
93
94$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/cvc/%.c
95	@($(LHEAD) $(LINT.c) $< $(LTAIL))
96
97$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/cvcredir/%.c
98	@($(LHEAD) $(LINT.c) $< $(LTAIL))
99
100$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/io/%.c
101	@($(LHEAD) $(LINT.c) $< $(LTAIL))
102
103$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/ml/%.s
104	@($(LHEAD) $(LINT.s) $< $(LTAIL))
105
106$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starfire/os/%.c
107	@($(LHEAD) $(LINT.c) $< $(LTAIL))
108