xref: /titanic_41/usr/src/uts/sun4v/niagara2/Makefile (revision 895ca178e38ac3583d0c0d8317d51dc5f388df6e)
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
23*895ca178Sae112802# Copyright 2008 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)/%)
43b02e9a2dSsvemuriLINTS		= $(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
7144961713Sgirish#
7244961713Sgirish# cpu-module-specific flags
7344961713Sgirish#
7444961713SgirishCPPFLAGS += -DCPU_MODULE -DNIAGARA2_IMPL
757ec363dcSwh94709CPPFLAGS += -DSUN4V_CONTIG_MEM_PREALLOC_SIZE_MB=196
7644961713SgirishAS_CPPFLAGS += -DCPU_MODULE -DNIAGARA2_IMPL
7744961713Sgirish
7844961713Sgirish#
79*895ca178Sae112802# The ATOMIC_BO_ENABLE_SHIFT enables backoff in atomic routines.
80*895ca178Sae112802# It is also used to scale final limit value w.r.t. number of
81*895ca178Sae112802# online cpus.
82*895ca178Sae112802#
83*895ca178Sae112802ATOMIC_BO_FLAG = -DATOMIC_BO_ENABLE_SHIFT=4
84*895ca178Sae112802CFLAGS += $(ATOMIC_BO_FLAG)
85*895ca178Sae112802CPPFLAGS +=$(ATOMIC_BO_FLAG)
86*895ca178Sae112802AS_CPPFLAGS += $(ATOMIC_BO_FLAG)
87*895ca178Sae112802
88*895ca178Sae112802#
8944961713Sgirish#	Default build targets.
9044961713Sgirish#
9144961713Sgirish.KEEP_STATE:
9244961713Sgirish
9344961713Sgirishdef:		$(DEF_DEPS)
9444961713Sgirish
9544961713Sgirishall:		$(ALL_DEPS)
9644961713Sgirish
9744961713Sgirishclean:		$(CLEAN_DEPS)
9844961713Sgirish
9944961713Sgirishclobber:	$(CLOBBER_DEPS)
10044961713Sgirish
10144961713Sgirishlint:		$(LINT_DEPS)
10244961713Sgirish
10344961713Sgirishmodlintlib:	$(MODLINTLIB_DEPS)
10444961713Sgirish
10544961713Sgirishclean.lint:	$(CLEAN_LINT_DEPS)
10644961713Sgirish
10744961713Sgirishinstall:	$(INSTALL_DEPS)
10844961713Sgirish
10944961713Sgirish$(CPULIB):	$(BINARY)
11044961713Sgirish	$(BUILD.SO) $(BINARY)
11144961713Sgirish
11244961713Sgirish$(SYM_MOD):	$(UNIX_O) $(CPULIB)
11344961713Sgirish	@echo "resolving symbols against unix.o"
11444961713Sgirish	@(cd $(UNIX_DIR); pwd; \
11544961713Sgirish	    CPU_DIR=$(HERE) SYM_MOD=$(HERE)/$(SYM_MOD) $(MAKE) symcheck)
11644961713Sgirish
11744961713Sgirish#	Include common targets.
11844961713Sgirish#
11944961713Sgirishinclude $(UTSBASE)/$(PLATFORM)/Makefile.targ
120