xref: /titanic_41/usr/src/uts/sun4u/starcat/Makefile.rules (revision 35a5a3587fd94b666239c157d3722745250ccbd7)
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/starcat and its children.
29#
30
31#
32# inline support for DR.
33#
34
35IL_CPP=$(CPP) -P -DINLINE -D_ASM $(AS_INC_PATH) \
36	$(CPP_DEFS) $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS)
37
38#
39#	Section 1a: C object build rules
40#
41
42DRMACH_IL=$(OBJS_DIR)/drmach.il
43
44$(OBJS_DIR)/drmach.o	:= CC_XARCH_32 = -xarch=v8plusa
45$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starcat/io/%.c $(DRMACH_IL)
46	$(COMPILE.c) $(DRMACH_IL) -o $@ $<
47	$(CTFCONVERT_O)
48
49$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starcat/os/%.c
50	$(COMPILE.c) -o $@ $<
51	$(CTFCONVERT_O)
52
53$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starcat/ml/%.s
54	$(COMPILE.s) -o $@ $<
55
56STARCAT_IO=$(UTSBASE)/sun4u/starcat/io
57
58CLEANFILES += $(STARCAT_IO)/drmach_err.c
59
60$(STARCAT_IO)/drmach_err.c: $(SBDGENERR) $(SBD_IOCTL)
61	$(RM) $@
62	$(SBDGENERRCMD) ESTC <$(SBD_IOCTL) >$@
63
64# inline stuff
65
66CLEANFILES += $(DRMACH_IL)
67
68$(DRMACH_IL):		$(UTSBASE)/sun4u/starcat/ml/drmach.il.cpp
69	$(IL_CPP) $(UTSBASE)/sun4u/starcat/ml/drmach.il.cpp > $@
70
71#
72#	Section 1b: Lint object build rules
73#
74
75$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starcat/os/%.c
76	@($(LHEAD) $(LINT.c) $< $(LTAIL))
77
78$(LINTS_DIR)/drmach.ln		:= LINTFLAGS += -I../sys
79$(LINTS_DIR)/sc_gptwoctfg.ln	:= LINTFLAGS += -I../sys
80
81$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starcat/io/%.c
82	@($(LHEAD) $(LINT.c) $< $(LTAIL))
83
84$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starcat/ml/%.s
85	@($(LHEAD) $(LINT.s) $< $(LTAIL))
86