xref: /titanic_52/usr/src/uts/sun4u/starcat/Makefile.rules (revision 03831d35f7499c87d51205817c93e9a8d42c4bae)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*03831d35Sstevel# Common Development and Distribution License (the "License").
6*03831d35Sstevel# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*03831d35Sstevel# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate#	This Makefile defines the build rules for the directory
287c478bd9Sstevel@tonic-gate#	uts/sun4u/starcat and its children.
297c478bd9Sstevel@tonic-gate#
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gate#
327c478bd9Sstevel@tonic-gate# inline support for DR.
337c478bd9Sstevel@tonic-gate#
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateIL_CPP=$(CPP) -P -DINLINE -D_ASM $(AS_INC_PATH) \
367c478bd9Sstevel@tonic-gate	$(CPP_DEFS) $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS)
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gate#
397c478bd9Sstevel@tonic-gate#	Section 1a: C object build rules
407c478bd9Sstevel@tonic-gate#
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gateDRMACH_IL=$(OBJS_DIR)/drmach.il
437c478bd9Sstevel@tonic-gate
44*03831d35Sstevel$(OBJS_DIR)/drmach.o	:= CC_XARCH_32 = -xarch=v8plusa
457c478bd9Sstevel@tonic-gate$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starcat/io/%.c $(DRMACH_IL)
467c478bd9Sstevel@tonic-gate	$(COMPILE.c) $(DRMACH_IL) -o $@ $<
477c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
487c478bd9Sstevel@tonic-gate
49*03831d35Sstevel$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starcat/os/%.c
50*03831d35Sstevel	$(COMPILE.c) -o $@ $<
51*03831d35Sstevel	$(CTFCONVERT_O)
52*03831d35Sstevel
53*03831d35Sstevel$(OBJS_DIR)/%.o:		$(UTSBASE)/sun4u/starcat/ml/%.s
54*03831d35Sstevel	$(COMPILE.s) -o $@ $<
55*03831d35Sstevel
56*03831d35SstevelSTARCAT_IO=$(UTSBASE)/sun4u/starcat/io
57*03831d35Sstevel
58*03831d35SstevelCLEANFILES += $(STARCAT_IO)/drmach_err.c
59*03831d35Sstevel
60*03831d35Sstevel$(STARCAT_IO)/drmach_err.c: $(SBDGENERR) $(SBD_IOCTL)
61*03831d35Sstevel	$(RM) $@
62*03831d35Sstevel	$(SBDGENERRCMD) ESTC <$(SBD_IOCTL) >$@
63*03831d35Sstevel
647c478bd9Sstevel@tonic-gate# inline stuff
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gateCLEANFILES += $(DRMACH_IL)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate$(DRMACH_IL):		$(UTSBASE)/sun4u/starcat/ml/drmach.il.cpp
697c478bd9Sstevel@tonic-gate	$(IL_CPP) $(UTSBASE)/sun4u/starcat/ml/drmach.il.cpp > $@
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gate#
727c478bd9Sstevel@tonic-gate#	Section 1b: Lint object build rules
737c478bd9Sstevel@tonic-gate#
747c478bd9Sstevel@tonic-gate
75*03831d35Sstevel$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starcat/os/%.c
76*03831d35Sstevel	@($(LHEAD) $(LINT.c) $< $(LTAIL))
77*03831d35Sstevel
78*03831d35Sstevel$(LINTS_DIR)/drmach.ln		:= LINTFLAGS += -I../sys
79*03831d35Sstevel$(LINTS_DIR)/sc_gptwoctfg.ln	:= LINTFLAGS += -I../sys
80*03831d35Sstevel
817c478bd9Sstevel@tonic-gate$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starcat/io/%.c
827c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
83*03831d35Sstevel
84*03831d35Sstevel$(LINTS_DIR)/%.ln:		$(UTSBASE)/sun4u/starcat/ml/%.s
85*03831d35Sstevel	@($(LHEAD) $(LINT.s) $< $(LTAIL))
86