xref: /titanic_41/usr/src/uts/sun4v/niagara2/Makefile (revision b02e9a2d4d2071d770e5aa9ae8f83f2bbe1f2ced)
144961713Sgirish#
244961713Sgirish# CDDL HEADER START
344961713Sgirish#
444961713Sgirish# The contents of this file are subject to the terms of the
544961713Sgirish# Common Development and Distribution License (the "License").
644961713Sgirish# You may not use this file except in compliance with the License.
744961713Sgirish#
844961713Sgirish# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
944961713Sgirish# or http://www.opensolaris.org/os/licensing.
1044961713Sgirish# See the License for the specific language governing permissions
1144961713Sgirish# and limitations under the License.
1244961713Sgirish#
1344961713Sgirish# When distributing Covered Code, include this CDDL HEADER in each
1444961713Sgirish# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1544961713Sgirish# If applicable, add the following below this CDDL HEADER, with the
1644961713Sgirish# fields enclosed by brackets "[]" replaced with your own identifying
1744961713Sgirish# information: Portions Copyright [yyyy] [name of copyright owner]
1844961713Sgirish#
1944961713Sgirish# CDDL HEADER END
2044961713Sgirish#
2144961713Sgirish#
2244961713Sgirish# uts/sun4v/niagara2/Makefile
238d4e547dSae112802# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2444961713Sgirish# Use is subject to license terms.
2544961713Sgirish#
2644961713Sgirish#ident	"%Z%%M%	%I%	%E% SMI"
2744961713Sgirish#
2844961713Sgirish#	This makefile drives the production of the UltraSPARC-T2 cpu module.
2944961713Sgirish#
3044961713Sgirish#	sun4v implementation architecture dependent
3144961713Sgirish#
3244961713Sgirish
3344961713Sgirish#
3444961713Sgirish#	Path to the base of the uts directory tree (usually /usr/src/uts).
3544961713Sgirish#
3644961713SgirishUTSBASE	= ../..
3744961713Sgirish
3844961713Sgirish#
3944961713Sgirish#	Define the module and object file sets.
4044961713Sgirish#
4144961713SgirishMODULE		= SUNW,UltraSPARC-T2
4244961713SgirishOBJECTS		= $(NIAGARA2CPU_OBJS:%=$(OBJS_DIR)/%)
43*b02e9a2dSsvemuriLINTS		= $(NIAGARA2CPU_OBJS:%.o=$(LINTS_DIR)/%.ln)
4444961713SgirishROOTMODULE	= $(ROOT_PSM_CPU_DIR)/$(MODULE)
4544961713Sgirish
4644961713SgirishCPU_DIR		= .
4744961713SgirishHERE		= ../niagara2
4844961713Sgirish
4944961713Sgirish#
5044961713Sgirish#	Include common rules.
5144961713Sgirish#
5244961713Sgirishinclude $(UTSBASE)/sun4v/Makefile.sun4v
5344961713Sgirish
5444961713Sgirish#
5544961713Sgirish#	Override defaults
5644961713Sgirish#
5744961713SgirishCLEANFILES	+= $(CPULIB) $(SYM_MOD)
5844961713Sgirish
5944961713Sgirish#
6044961713Sgirish#	Define targets
6144961713Sgirish#
6244961713SgirishALL_TARGET	= $(SYM_MOD)
6344961713SgirishLINT_TARGET	= $(MODULE).lint
6444961713SgirishINSTALL_TARGET	= def $(BINARY) $(ROOTMODULE)
6544961713Sgirish
6644961713Sgirish#
6744961713Sgirish# lint pass one enforcement
6844961713Sgirish#
6944961713SgirishCFLAGS += $(CCVERBOSE) -DNIAGARA2_IMPL
7044961713Sgirish
718d4e547dSae112802# The following is required to support Niagara2 1.0
728d4e547dSae112802WORKAROUND_DEFS	+= -DN2_ERRATUM_49	# %stick_compare{6:0} ignored
738d4e547dSae112802
7444961713Sgirish#
7544961713Sgirish# cpu-module-specific flags
7644961713Sgirish#
7744961713SgirishCPPFLAGS += -DCPU_MODULE -DNIAGARA2_IMPL
7844961713SgirishAS_CPPFLAGS += -DCPU_MODULE -DNIAGARA2_IMPL
7944961713Sgirish
8044961713Sgirish#
8144961713Sgirish#	Default build targets.
8244961713Sgirish#
8344961713Sgirish.KEEP_STATE:
8444961713Sgirish
8544961713Sgirishdef:		$(DEF_DEPS)
8644961713Sgirish
8744961713Sgirishall:		$(ALL_DEPS)
8844961713Sgirish
8944961713Sgirishclean:		$(CLEAN_DEPS)
9044961713Sgirish
9144961713Sgirishclobber:	$(CLOBBER_DEPS)
9244961713Sgirish
9344961713Sgirishlint:		$(LINT_DEPS)
9444961713Sgirish
9544961713Sgirishmodlintlib:	$(MODLINTLIB_DEPS)
9644961713Sgirish
9744961713Sgirishclean.lint:	$(CLEAN_LINT_DEPS)
9844961713Sgirish
9944961713Sgirishinstall:	$(INSTALL_DEPS)
10044961713Sgirish
10144961713Sgirish$(CPULIB):	$(BINARY)
10244961713Sgirish	$(BUILD.SO) $(BINARY)
10344961713Sgirish
10444961713Sgirish$(SYM_MOD):	$(UNIX_O) $(CPULIB)
10544961713Sgirish	@echo "resolving symbols against unix.o"
10644961713Sgirish	@(cd $(UNIX_DIR); pwd; \
10744961713Sgirish	    CPU_DIR=$(HERE) SYM_MOD=$(HERE)/$(SYM_MOD) $(MAKE) symcheck)
10844961713Sgirish
10944961713Sgirish#	Include common targets.
11044961713Sgirish#
11144961713Sgirishinclude $(UTSBASE)/$(PLATFORM)/Makefile.targ
112