xref: /titanic_51/usr/src/uts/sun4v/kt/Makefile (revision 4df55fde49134f9735f84011f23a767c75e393c7)
1*4df55fdeSJanie Lu#
2*4df55fdeSJanie Lu# CDDL HEADER START
3*4df55fdeSJanie Lu#
4*4df55fdeSJanie Lu# The contents of this file are subject to the terms of the
5*4df55fdeSJanie Lu# Common Development and Distribution License (the "License").
6*4df55fdeSJanie Lu# You may not use this file except in compliance with the License.
7*4df55fdeSJanie Lu#
8*4df55fdeSJanie Lu# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*4df55fdeSJanie Lu# or http://www.opensolaris.org/os/licensing.
10*4df55fdeSJanie Lu# See the License for the specific language governing permissions
11*4df55fdeSJanie Lu# and limitations under the License.
12*4df55fdeSJanie Lu#
13*4df55fdeSJanie Lu# When distributing Covered Code, include this CDDL HEADER in each
14*4df55fdeSJanie Lu# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*4df55fdeSJanie Lu# If applicable, add the following below this CDDL HEADER, with the
16*4df55fdeSJanie Lu# fields enclosed by brackets "[]" replaced with your own identifying
17*4df55fdeSJanie Lu# information: Portions Copyright [yyyy] [name of copyright owner]
18*4df55fdeSJanie Lu#
19*4df55fdeSJanie Lu# CDDL HEADER END
20*4df55fdeSJanie Lu#
21*4df55fdeSJanie Lu#
22*4df55fdeSJanie Lu# uts/sun4v/kt/Makefile
23*4df55fdeSJanie Lu# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*4df55fdeSJanie Lu# Use is subject to license terms.
25*4df55fdeSJanie Lu#
26*4df55fdeSJanie Lu#	This makefile drives the production of the UltraSPARC-KT cpu module.
27*4df55fdeSJanie Lu#
28*4df55fdeSJanie Lu#	sun4v implementation architecture dependent
29*4df55fdeSJanie Lu#
30*4df55fdeSJanie Lu
31*4df55fdeSJanie Lu#
32*4df55fdeSJanie Lu#	Path to the base of the uts directory tree (usually /usr/src/uts).
33*4df55fdeSJanie Lu#
34*4df55fdeSJanie LuUTSBASE	= ../..
35*4df55fdeSJanie Lu
36*4df55fdeSJanie Lu#
37*4df55fdeSJanie Lu#	Define the module and object file sets.
38*4df55fdeSJanie Lu#
39*4df55fdeSJanie LuMODULE		= SUNW,UltraSPARC-KT
40*4df55fdeSJanie LuOBJECTS		= $(NIAGARA2CPU_OBJS:%=$(OBJS_DIR)/%)
41*4df55fdeSJanie LuLINTS		= $(NIAGARA2CPU_OBJS:%.o=$(LINTS_DIR)/%.ln)
42*4df55fdeSJanie LuROOTMODULE	= $(ROOT_PSM_CPU_DIR)/$(MODULE)
43*4df55fdeSJanie Lu
44*4df55fdeSJanie LuCPU_DIR		= .
45*4df55fdeSJanie LuHERE		= ../kt
46*4df55fdeSJanie Lu
47*4df55fdeSJanie Lu#
48*4df55fdeSJanie Lu#	Include common rules.
49*4df55fdeSJanie Lu#
50*4df55fdeSJanie Luinclude $(UTSBASE)/sun4v/Makefile.sun4v
51*4df55fdeSJanie Lu
52*4df55fdeSJanie Lu#
53*4df55fdeSJanie Lu#	Override defaults
54*4df55fdeSJanie Lu#
55*4df55fdeSJanie LuCLEANFILES	+= $(CPULIB) $(SYM_MOD)
56*4df55fdeSJanie Lu
57*4df55fdeSJanie Lu#
58*4df55fdeSJanie Lu#	Define targets
59*4df55fdeSJanie Lu#
60*4df55fdeSJanie LuALL_TARGET	= $(SYM_MOD)
61*4df55fdeSJanie LuLINT_TARGET	= $(MODULE).lint
62*4df55fdeSJanie LuINSTALL_TARGET	= def $(BINARY) $(ROOTMODULE)
63*4df55fdeSJanie Lu
64*4df55fdeSJanie Lu#
65*4df55fdeSJanie Lu# lint pass one enforcement
66*4df55fdeSJanie Lu#
67*4df55fdeSJanie LuCFLAGS += $(CCVERBOSE) -DKT_IMPL
68*4df55fdeSJanie Lu
69*4df55fdeSJanie Lu#
70*4df55fdeSJanie Lu# The ATOMIC_BO_ENABLE_SHIFT enables backoff in atomic routines.
71*4df55fdeSJanie Lu# It is also used to scale final limit value w.r.t. number of
72*4df55fdeSJanie Lu# online cpus.
73*4df55fdeSJanie Lu#
74*4df55fdeSJanie LuATOMIC_BO_FLAG = -DATOMIC_BO_ENABLE_SHIFT=4
75*4df55fdeSJanie LuCFLAGS += $(ATOMIC_BO_FLAG)
76*4df55fdeSJanie LuCPPFLAGS +=$(ATOMIC_BO_FLAG)
77*4df55fdeSJanie LuAS_CPPFLAGS += $(ATOMIC_BO_FLAG)
78*4df55fdeSJanie Lu
79*4df55fdeSJanie Lu#
80*4df55fdeSJanie Lu# cpu-module-specific flags
81*4df55fdeSJanie Lu#
82*4df55fdeSJanie LuCPPFLAGS += -DCPU_MODULE -DKT_IMPL
83*4df55fdeSJanie LuCPPFLAGS += -DSUN4V_CONTIG_MEM_PREALLOC_SIZE_MB=68
84*4df55fdeSJanie LuAS_CPPFLAGS += -DCPU_MODULE -DKT_IMPL
85*4df55fdeSJanie Lu
86*4df55fdeSJanie Lu#
87*4df55fdeSJanie Lu#	Default build targets.
88*4df55fdeSJanie Lu#
89*4df55fdeSJanie Lu.KEEP_STATE:
90*4df55fdeSJanie Lu
91*4df55fdeSJanie Ludef:		$(DEF_DEPS)
92*4df55fdeSJanie Lu
93*4df55fdeSJanie Luall:		$(ALL_DEPS)
94*4df55fdeSJanie Lu
95*4df55fdeSJanie Luclean:		$(CLEAN_DEPS)
96*4df55fdeSJanie Lu
97*4df55fdeSJanie Luclobber:	$(CLOBBER_DEPS)
98*4df55fdeSJanie Lu
99*4df55fdeSJanie Lulint:		$(LINT_DEPS)
100*4df55fdeSJanie Lu
101*4df55fdeSJanie Lumodlintlib:	$(MODLINTLIB_DEPS)
102*4df55fdeSJanie Lu
103*4df55fdeSJanie Luclean.lint:	$(CLEAN_LINT_DEPS)
104*4df55fdeSJanie Lu
105*4df55fdeSJanie Luinstall:	$(INSTALL_DEPS)
106*4df55fdeSJanie Lu
107*4df55fdeSJanie Lu$(CPULIB):	$(BINARY)
108*4df55fdeSJanie Lu	$(BUILD.SO) $(BINARY)
109*4df55fdeSJanie Lu
110*4df55fdeSJanie Lu$(SYM_MOD):	$(UNIX_O) $(CPULIB)
111*4df55fdeSJanie Lu	@echo "resolving symbols against unix.o"
112*4df55fdeSJanie Lu	@(cd $(UNIX_DIR); pwd; \
113*4df55fdeSJanie Lu	    CPU_DIR=$(HERE) SYM_MOD=$(HERE)/$(SYM_MOD) $(MAKE) symcheck)
114*4df55fdeSJanie Lu
115*4df55fdeSJanie Lu#	Include common targets.
116*4df55fdeSJanie Lu#
117*4df55fdeSJanie Luinclude $(UTSBASE)/$(PLATFORM)/Makefile.targ
118