xref: /titanic_51/usr/src/uts/sun4v/Makefile.sun4v (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate#
26*7c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate#	This makefile contains the common definitions for the sun4v unix
29*7c478bd9Sstevel@tonic-gate#	and all sun4v implementation architecture dependent modules.
30*7c478bd9Sstevel@tonic-gate#
31*7c478bd9Sstevel@tonic-gate
32*7c478bd9Sstevel@tonic-gate#
33*7c478bd9Sstevel@tonic-gate#	Machine type (implementation architecture):
34*7c478bd9Sstevel@tonic-gate#
35*7c478bd9Sstevel@tonic-gatePLATFORM	 = sun4v
36*7c478bd9Sstevel@tonic-gateOPLATFORM	 = sun4u
37*7c478bd9Sstevel@tonic-gatePROMIF		 = ieee1275
38*7c478bd9Sstevel@tonic-gatePSMBASE		 = $(UTSBASE)/../psm
39*7c478bd9Sstevel@tonic-gate
40*7c478bd9Sstevel@tonic-gate#
41*7c478bd9Sstevel@tonic-gate# Definitions for the platform-specific /platform directories.
42*7c478bd9Sstevel@tonic-gate#
43*7c478bd9Sstevel@tonic-gate# PLATFORMS designates those sun4v machines which have no platform
44*7c478bd9Sstevel@tonic-gate# specific code.
45*7c478bd9Sstevel@tonic-gate#
46*7c478bd9Sstevel@tonic-gate# IMPLEMENTATIONS is used to designate sun4v machines which have
47*7c478bd9Sstevel@tonic-gate# platform specific modules.  All code specific to a given implementation
48*7c478bd9Sstevel@tonic-gate# resides in the appropriately named subdirectory.   This requires
49*7c478bd9Sstevel@tonic-gate# these platforms to have their own Makefiles to define ROOT_PLAT_DIRS,
50*7c478bd9Sstevel@tonic-gate# USR_PLAT_DIRS, etc.
51*7c478bd9Sstevel@tonic-gate# The number of IMPLEMENTATIONS should not grow!
52*7c478bd9Sstevel@tonic-gate#
53*7c478bd9Sstevel@tonic-gate# So if we had an implementation named 'foo', we would need the following
54*7c478bd9Sstevel@tonic-gate# Makefiles in the foo subdirectory:
55*7c478bd9Sstevel@tonic-gate#
56*7c478bd9Sstevel@tonic-gate#	sun4v/foo/Makefile
57*7c478bd9Sstevel@tonic-gate#	sun4v/foo/Makefile.foo
58*7c478bd9Sstevel@tonic-gate#	sun4v/foo/Makefile.targ
59*7c478bd9Sstevel@tonic-gate#
60*7c478bd9Sstevel@tonic-gate
61*7c478bd9Sstevel@tonic-gate#
62*7c478bd9Sstevel@tonic-gate# all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list.
63*7c478bd9Sstevel@tonic-gate# This list should be empty.  A platform without platform modules
64*7c478bd9Sstevel@tonic-gate# is a plain, generic sun4v platform.
65*7c478bd9Sstevel@tonic-gate#
66*7c478bd9Sstevel@tonic-gate#IMPLEMENTED_PLATFORM	=
67*7c478bd9Sstevel@tonic-gate#PLATFORMS                = $(IMPLEMENTED_PLATFORM)
68*7c478bd9Sstevel@tonic-gate
69*7c478bd9Sstevel@tonic-gate# IMPLEMENTATIONS is used by Install.sh, must not use backslash to continue
70*7c478bd9Sstevel@tonic-gate# the lines.
71*7c478bd9Sstevel@tonic-gateIMPLEMENTATIONS		= ontario
72*7c478bd9Sstevel@tonic-gate
73*7c478bd9Sstevel@tonic-gate#ROOT_PLAT_DIRS		= $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%)
74*7c478bd9Sstevel@tonic-gate#USR_PLAT_DIRS		= $(PLATFORMS:%=$(USR_PLAT_DIR)/%)
75*7c478bd9Sstevel@tonic-gate
76*7c478bd9Sstevel@tonic-gate#USR_DESKTOP_DIR		= $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM)
77*7c478bd9Sstevel@tonic-gate#USR_DESKTOP_INC_DIR	= $(USR_DESKTOP_DIR)/include
78*7c478bd9Sstevel@tonic-gate#USR_DESKTOP_SBIN_DIR	= $(USR_DESKTOP_DIR)/sbin
79*7c478bd9Sstevel@tonic-gate#USR_DESKTOP_LIB_DIR	= $(USR_DESKTOP_DIR)/lib
80*7c478bd9Sstevel@tonic-gate
81*7c478bd9Sstevel@tonic-gate#
82*7c478bd9Sstevel@tonic-gate#	Define supported builds
83*7c478bd9Sstevel@tonic-gate#
84*7c478bd9Sstevel@tonic-gateDEF_BUILDS	= $(DEF_BUILDS64)
85*7c478bd9Sstevel@tonic-gateALL_BUILDS	= $(ALL_BUILDS64)
86*7c478bd9Sstevel@tonic-gate
87*7c478bd9Sstevel@tonic-gate#
88*7c478bd9Sstevel@tonic-gate#	Everybody needs to know how to build modstubs.o and to locate unix.o
89*7c478bd9Sstevel@tonic-gate#
90*7c478bd9Sstevel@tonic-gateUNIX_DIR	 = $(UTSBASE)/$(PLATFORM)/unix
91*7c478bd9Sstevel@tonic-gateGENLIB_DIR	 = $(UTSBASE)/$(PLATFORM)/genunix
92*7c478bd9Sstevel@tonic-gateMODSTUBS_DIR	 = $(UNIX_DIR)
93*7c478bd9Sstevel@tonic-gateDSF_DIR		 = $(UTSBASE)/$(PLATFORM)/genassym
94*7c478bd9Sstevel@tonic-gateLINTS_DIR	 = $(OBJS_DIR)
95*7c478bd9Sstevel@tonic-gateLINT_LIB_DIR	 = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
96*7c478bd9Sstevel@tonic-gate
97*7c478bd9Sstevel@tonic-gateDTRACESTUBS_O	 = $(OBJS_DIR)/dtracestubs.o
98*7c478bd9Sstevel@tonic-gateDTRACESTUBS	 = $(OBJS_DIR)/libdtracestubs.so
99*7c478bd9Sstevel@tonic-gate
100*7c478bd9Sstevel@tonic-gateUNIX_O		 = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
101*7c478bd9Sstevel@tonic-gateMODSTUBS_O	 = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
102*7c478bd9Sstevel@tonic-gateGENLIB	 	 = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
103*7c478bd9Sstevel@tonic-gate
104*7c478bd9Sstevel@tonic-gateLINT_LIB	 = $(LINT_LIB_DIR)/llib-lunix.ln
105*7c478bd9Sstevel@tonic-gateGEN_LINT_LIB	 = $(LINT_LIB_DIR)/llib-lgenunix.ln
106*7c478bd9Sstevel@tonic-gate
107*7c478bd9Sstevel@tonic-gateLINT64_DIRS	 = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%)
108*7c478bd9Sstevel@tonic-gateLINT64_FILES	 = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
109*7c478bd9Sstevel@tonic-gate
110*7c478bd9Sstevel@tonic-gate#
111*7c478bd9Sstevel@tonic-gate#	cpu and platform modules need to know how to build their own symcheck module
112*7c478bd9Sstevel@tonic-gate#
113*7c478bd9Sstevel@tonic-gatePLATMOD		 = platmod
114*7c478bd9Sstevel@tonic-gatePLATLIB		 = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so
115*7c478bd9Sstevel@tonic-gate
116*7c478bd9Sstevel@tonic-gateCPUNAME		 = cpu
117*7c478bd9Sstevel@tonic-gateCPULIB		 = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so
118*7c478bd9Sstevel@tonic-gate
119*7c478bd9Sstevel@tonic-gateSYM_MOD		 = $(OBJS_DIR)/unix.sym
120*7c478bd9Sstevel@tonic-gate
121*7c478bd9Sstevel@tonic-gate#
122*7c478bd9Sstevel@tonic-gate#	Include the makefiles which define build rule templates, the
123*7c478bd9Sstevel@tonic-gate#	collection of files per module, and a few specific flags. Note
124*7c478bd9Sstevel@tonic-gate#	that order is significant, just as with an include path. The
125*7c478bd9Sstevel@tonic-gate#	first build rule template which matches the files name will be
126*7c478bd9Sstevel@tonic-gate#	used. By including these in order from most machine dependent
127*7c478bd9Sstevel@tonic-gate#	to most machine independent, we allow a machine dependent file
128*7c478bd9Sstevel@tonic-gate#	to be used in preference over a machine independent version
129*7c478bd9Sstevel@tonic-gate#	(Such as a machine specific optimization, which preserves the
130*7c478bd9Sstevel@tonic-gate#	interfaces.)
131*7c478bd9Sstevel@tonic-gate#
132*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sun4/Makefile.files
133*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/$(PLATFORM)/Makefile.files
134*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sfmmu/Makefile.files
135*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sparc/v9/Makefile.files
136*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sparc/Makefile.files
137*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sun/Makefile.files
138*7c478bd9Sstevel@tonic-gateinclude $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files
139*7c478bd9Sstevel@tonic-gateinclude $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files
140*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/common/Makefile.files
141*7c478bd9Sstevel@tonic-gate
142*7c478bd9Sstevel@tonic-gate#
143*7c478bd9Sstevel@tonic-gate#	Include machine independent rules. Note that this does not imply
144*7c478bd9Sstevel@tonic-gate#	that the resulting module from rules in Makefile.uts is	machine
145*7c478bd9Sstevel@tonic-gate#	independent. Only that the build rules are machine independent.
146*7c478bd9Sstevel@tonic-gate#
147*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/Makefile.uts
148*7c478bd9Sstevel@tonic-gate
149*7c478bd9Sstevel@tonic-gateCTFMERGE_GUDIR	= sun4v
150*7c478bd9Sstevel@tonic-gate
151*7c478bd9Sstevel@tonic-gate#
152*7c478bd9Sstevel@tonic-gate#	machine specific optimization, override default in Makefile.master
153*7c478bd9Sstevel@tonic-gate#
154*7c478bd9Sstevel@tonic-gateQTOOLS_ROOT=		$(SPRO_ROOT)/sun4v
155*7c478bd9Sstevel@tonic-gatesparc_AS=		$(QTOOLS_ROOT)/qas -xregsym=no
156*7c478bd9Sstevel@tonic-gatesparcv9_AS=		$(QTOOLS_ROOT)/qas -xregsym=no
157*7c478bd9Sstevel@tonic-gate
158*7c478bd9Sstevel@tonic-gateCC_XARCH	= -xarch=v9a
159*7c478bd9Sstevel@tonic-gateAS_XARCH	= -xarch=v9d
160*7c478bd9Sstevel@tonic-gateCOPTIMIZE	= -xO3
161*7c478bd9Sstevel@tonic-gateCCMODE		= -Xa
162*7c478bd9Sstevel@tonic-gate
163*7c478bd9Sstevel@tonic-gateCFLAGS		= -xchip=ultra $(CCABS32) $(CCREGSYM)
164*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(CC_XARCH)
165*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(COPTIMIZE)
166*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(EXTRA_CFLAGS)
167*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(XAOPT)
168*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(INLINES)
169*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(CCMODE)
170*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(SPACEFLAG)
171*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(CERRWARN)
172*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(CTF_FLAGS)
173*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(C99MODE)
174*7c478bd9Sstevel@tonic-gateCFLAGS		+= $(CCUNBOUND)
175*7c478bd9Sstevel@tonic-gateCFLAGS		+= -xregs=no%float
176*7c478bd9Sstevel@tonic-gateCPPFLAGS	+= -DGLREG
177*7c478bd9Sstevel@tonic-gate
178*7c478bd9Sstevel@tonic-gateASFLAGS		+= $(AS_XARCH) -DGLREG
179*7c478bd9Sstevel@tonic-gate
180*7c478bd9Sstevel@tonic-gateAS_INC_PATH	+= -I$(DSF_DIR)/$(OBJS_DIR)
181*7c478bd9Sstevel@tonic-gate
182*7c478bd9Sstevel@tonic-gateLINT_KMODS	+= $(GENUNIX_KMODS)
183*7c478bd9Sstevel@tonic-gate
184*7c478bd9Sstevel@tonic-gateLINT_DEFS	= -Xarch=v9
185*7c478bd9Sstevel@tonic-gate
186*7c478bd9Sstevel@tonic-gate#
187*7c478bd9Sstevel@tonic-gate#	The following must be defined for all implementations:
188*7c478bd9Sstevel@tonic-gate#
189*7c478bd9Sstevel@tonic-gate#	MAPFILE:		ld mapfile for the build of kernel/unix.
190*7c478bd9Sstevel@tonic-gate#	MODSTUBS:		Module stubs source file.
191*7c478bd9Sstevel@tonic-gate#	GENCONST_SRC:		genconst.c
192*7c478bd9Sstevel@tonic-gate#	OFFSETS:		offsets.in
193*7c478bd9Sstevel@tonic-gate#	PLATFORM_OFFSETS:	Platform specific mach_offsets.in
194*7c478bd9Sstevel@tonic-gate#	FDOFFSETS:		fd_offsets.in
195*7c478bd9Sstevel@tonic-gate#
196*7c478bd9Sstevel@tonic-gateMAPFILE		 = $(UTSBASE)/$(OPLATFORM)/conf/Mapfile
197*7c478bd9Sstevel@tonic-gateMODSTUBS	 = $(UTSBASE)/sparc/ml/modstubs.s
198*7c478bd9Sstevel@tonic-gateGENCONST_SRC	 = $(UTSBASE)/sun4/ml/genconst.c
199*7c478bd9Sstevel@tonic-gateOFFSETS		 = $(UTSBASE)/sun4/ml/offsets.in
200*7c478bd9Sstevel@tonic-gatePLATFORM_OFFSETS = $(UTSBASE)/sun4v/ml/mach_offsets.in
201*7c478bd9Sstevel@tonic-gateFDOFFSETS 	 = $(UTSBASE)/sun/io/fd_offsets.in
202*7c478bd9Sstevel@tonic-gate
203*7c478bd9Sstevel@tonic-gate#
204*7c478bd9Sstevel@tonic-gate#	Define the actual specific platforms
205*7c478bd9Sstevel@tonic-gate#
206*7c478bd9Sstevel@tonic-gate
207*7c478bd9Sstevel@tonic-gateMACHINE_DEFS	= -D$(PLATFORM) -D_MACHDEP -DSFMMU
208*7c478bd9Sstevel@tonic-gate
209*7c478bd9Sstevel@tonic-gate$(MPSAS_BUILD)MACHINE_DEFS      += -DMPSAS
210*7c478bd9Sstevel@tonic-gate
211*7c478bd9Sstevel@tonic-gate#
212*7c478bd9Sstevel@tonic-gate#	Software workarounds for hardware "features"
213*7c478bd9Sstevel@tonic-gate#
214*7c478bd9Sstevel@tonic-gate
215*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
216*7c478bd9Sstevel@tonic-gate
217*7c478bd9Sstevel@tonic-gate#
218*7c478bd9Sstevel@tonic-gate#	Debugging level
219*7c478bd9Sstevel@tonic-gate#
220*7c478bd9Sstevel@tonic-gate#	Special knowledge of which special debugging options effect which
221*7c478bd9Sstevel@tonic-gate#	file is used to optimize the build if these flags are changed.
222*7c478bd9Sstevel@tonic-gate#
223*7c478bd9Sstevel@tonic-gate#	XXX: The above could possibly be done for more flags and files, but
224*7c478bd9Sstevel@tonic-gate#	     is left as an experiment to the interested reader. Be forewarned,
225*7c478bd9Sstevel@tonic-gate#	     that excessive use could lead to maintenance difficulties.
226*7c478bd9Sstevel@tonic-gate#
227*7c478bd9Sstevel@tonic-gate#	Note: kslice can be enabled for the sun4v, but is disabled by default
228*7c478bd9Sstevel@tonic-gate#	      in all cases.
229*7c478bd9Sstevel@tonic-gate#
230*7c478bd9Sstevel@tonic-gate
231*7c478bd9Sstevel@tonic-gateDEBUG_DEFS_OBJ64	=
232*7c478bd9Sstevel@tonic-gateDEBUG_DEFS_DBG64	= -DDEBUG
233*7c478bd9Sstevel@tonic-gateDEBUG_DEFS		= $(DEBUG_DEFS_$(BUILD_TYPE))
234*7c478bd9Sstevel@tonic-gate
235*7c478bd9Sstevel@tonic-gateDEBUG_COND_OBJ64	:sh = echo \\043
236*7c478bd9Sstevel@tonic-gateDEBUG_COND_DBG64	=
237*7c478bd9Sstevel@tonic-gateIF_DEBUG_OBJ		= $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
238*7c478bd9Sstevel@tonic-gate
239*7c478bd9Sstevel@tonic-gate$(IF_DEBUG_OBJ)trap.o		:=	DEBUG_DEFS	+= -DTRAPDEBUG
240*7c478bd9Sstevel@tonic-gate$(IF_DEBUG_OBJ)mach_trap.o	:=	DEBUG_DEFS	+= -DTRAPDEBUG
241*7c478bd9Sstevel@tonic-gate$(IF_DEBUG_OBJ)syscall_trap.o	:=	DEBUG_DEFS	+= -DSYSCALLTRACE
242*7c478bd9Sstevel@tonic-gate$(IF_DEBUG_OBJ)clock.o		:=	DEBUG_DEFS	+= -DKSLICE=0
243*7c478bd9Sstevel@tonic-gate
244*7c478bd9Sstevel@tonic-gateIF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ)
245*7c478bd9Sstevel@tonic-gate# comment this out for a non-debug kernel with TRAPTRACE
246*7c478bd9Sstevel@tonic-gate#IF_TRAPTRACE_OBJ = $(OBJS_DIR)/
247*7c478bd9Sstevel@tonic-gate
248*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)locore.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
249*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mach_locore.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
250*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mlsetup.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
251*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)syscall_trap.o 	:=	DEBUG_DEFS	+= -DTRAPTRACE
252*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)startup.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
253*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mach_startup.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
254*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mp_startup.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
255*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mach_mp_startup.o 	:=	DEBUG_DEFS	+= -DTRAPTRACE
256*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)cpu_states.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
257*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mach_cpu_states.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
258*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)interrupt.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
259*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mach_interrupt.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
260*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mach_sfmmu_asm.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
261*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)sfmmu_asm.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
262*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)trap_table.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
263*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)xc.o			:=	DEBUG_DEFS	+= -DTRAPTRACE
264*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mach_xc.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
265*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)wbuf.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
266*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)trap.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
267*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)mach_trap.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
268*7c478bd9Sstevel@tonic-gate$(IF_TRAPTRACE_OBJ)cheetah_asm.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
269*7c478bd9Sstevel@tonic-gate
270*7c478bd9Sstevel@tonic-gate# Comment these out if you don't want dispatcher lock statistics.
271*7c478bd9Sstevel@tonic-gate
272*7c478bd9Sstevel@tonic-gate#$(IF_DEBUG_OBJ)lock_prim.o	:= DEBUG_DEFS	+= -DDISP_LOCK_STATS
273*7c478bd9Sstevel@tonic-gate#$(IF_DEBUG_OBJ)disp.o		:= DEBUG_DEFS	+= -DDISP_LOCK_STATS
274*7c478bd9Sstevel@tonic-gate
275*7c478bd9Sstevel@tonic-gate# Comment these out if you don't want dispatcher debugging
276*7c478bd9Sstevel@tonic-gate
277*7c478bd9Sstevel@tonic-gate#$(IF_DEBUG_OBJ)lock_prim.o	:= DEBUG_DEFS	+= -DDISP_DEBUG
278*7c478bd9Sstevel@tonic-gate
279*7c478bd9Sstevel@tonic-gate#
280*7c478bd9Sstevel@tonic-gate#	Build `options'. These are mostly historical and the need for these
281*7c478bd9Sstevel@tonic-gate#	is largely removed by the module technology. However, the static
282*7c478bd9Sstevel@tonic-gate#	build will continue to require these.
283*7c478bd9Sstevel@tonic-gate#
284*7c478bd9Sstevel@tonic-gateOPTION_DEFS	 = -DC2_AUDIT
285*7c478bd9Sstevel@tonic-gate
286*7c478bd9Sstevel@tonic-gate#
287*7c478bd9Sstevel@tonic-gate#	Collect the preprocessor definitions to be associated with *all*
288*7c478bd9Sstevel@tonic-gate#	files.
289*7c478bd9Sstevel@tonic-gate#
290*7c478bd9Sstevel@tonic-gateALL_DEFS	 = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
291*7c478bd9Sstevel@tonic-gate		   $(OPTION_DEFS)
292*7c478bd9Sstevel@tonic-gateGENCONST_DEFS	 = $(MACHINE_DEFS) $(OPTION_DEFS)
293*7c478bd9Sstevel@tonic-gate
294*7c478bd9Sstevel@tonic-gate#
295*7c478bd9Sstevel@tonic-gate# ----- TRANSITIONAL SECTION --------------------------------------------------
296*7c478bd9Sstevel@tonic-gate#
297*7c478bd9Sstevel@tonic-gate
298*7c478bd9Sstevel@tonic-gate#
299*7c478bd9Sstevel@tonic-gate#	Not everything which *should* be a module is a module yet. The
300*7c478bd9Sstevel@tonic-gate#	following is a list of such objects which are currently part of
301*7c478bd9Sstevel@tonic-gate#	the base kernel but should soon become kmods.
302*7c478bd9Sstevel@tonic-gate#
303*7c478bd9Sstevel@tonic-gateMACH_NOT_YET_KMODS	 = $(AUTOCONF_OBJS)
304*7c478bd9Sstevel@tonic-gate
305*7c478bd9Sstevel@tonic-gate#
306*7c478bd9Sstevel@tonic-gate# ----- END OF TRANSITIONAL SECTION -------------------------------------------
307*7c478bd9Sstevel@tonic-gate#
308*7c478bd9Sstevel@tonic-gate
309*7c478bd9Sstevel@tonic-gate#
310*7c478bd9Sstevel@tonic-gate#	The kernels modules which are "implementation architecture"
311*7c478bd9Sstevel@tonic-gate#	specific for this machine are enumerated below. Note that most
312*7c478bd9Sstevel@tonic-gate#	of these modules must exist (in one form or another) for each
313*7c478bd9Sstevel@tonic-gate#	architecture.
314*7c478bd9Sstevel@tonic-gate#
315*7c478bd9Sstevel@tonic-gate#	Common Drivers (usually pseudo drivers) (/kernel/drv):
316*7c478bd9Sstevel@tonic-gate#
317*7c478bd9Sstevel@tonic-gate
318*7c478bd9Sstevel@tonic-gate#
319*7c478bd9Sstevel@tonic-gate#	Machine Specific Driver Modules (/kernel/drv):
320*7c478bd9Sstevel@tonic-gate#
321*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= vnex
322*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= qcn
323*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= dma
324*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= cpc
325*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= rootnex
326*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= trapstat
327*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= px
328*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= glvc
329*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= bge
330*7c478bd9Sstevel@tonic-gateDRV_KMODS      += mdesc
331*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= ncp
332*7c478bd9Sstevel@tonic-gateDRV_KMODS	+= ebus
333*7c478bd9Sstevel@tonic-gate#
334*7c478bd9Sstevel@tonic-gate#	Exec Class Modules (/kernel/exec):
335*7c478bd9Sstevel@tonic-gate#
336*7c478bd9Sstevel@tonic-gateEXEC_KMODS	+=
337*7c478bd9Sstevel@tonic-gate
338*7c478bd9Sstevel@tonic-gate#
339*7c478bd9Sstevel@tonic-gate#	Scheduling Class Modules (/kernel/sched):
340*7c478bd9Sstevel@tonic-gate#
341*7c478bd9Sstevel@tonic-gateSCHED_KMODS	+=
342*7c478bd9Sstevel@tonic-gate
343*7c478bd9Sstevel@tonic-gate#
344*7c478bd9Sstevel@tonic-gate#	File System Modules (/kernel/fs):
345*7c478bd9Sstevel@tonic-gate#
346*7c478bd9Sstevel@tonic-gateFS_KMODS	+=
347*7c478bd9Sstevel@tonic-gate
348*7c478bd9Sstevel@tonic-gate#
349*7c478bd9Sstevel@tonic-gate#	Streams Modules (/kernel/strmod):
350*7c478bd9Sstevel@tonic-gate#
351*7c478bd9Sstevel@tonic-gate# STRMOD_KMODS	+= kb
352*7c478bd9Sstevel@tonic-gate
353*7c478bd9Sstevel@tonic-gate#
354*7c478bd9Sstevel@tonic-gate#	'System' Modules (/kernel/sys):
355*7c478bd9Sstevel@tonic-gate#
356*7c478bd9Sstevel@tonic-gateSYS_KMODS	+=
357*7c478bd9Sstevel@tonic-gate
358*7c478bd9Sstevel@tonic-gate#
359*7c478bd9Sstevel@tonic-gate#	'User' Modules (/kernel/misc):
360*7c478bd9Sstevel@tonic-gate#
361*7c478bd9Sstevel@tonic-gateMISC_KMODS	+= obpsym bootdev vis platmod
362*7c478bd9Sstevel@tonic-gate
363*7c478bd9Sstevel@tonic-gate#
364*7c478bd9Sstevel@tonic-gate#	generic-unix module (/kernel/genunix):
365*7c478bd9Sstevel@tonic-gate#
366*7c478bd9Sstevel@tonic-gateGENUNIX_KMODS	+= genunix
367*7c478bd9Sstevel@tonic-gate
368*7c478bd9Sstevel@tonic-gate#	'User' "Modules" excluded from the Full Kernel lint target:
369*7c478bd9Sstevel@tonic-gate#
370*7c478bd9Sstevel@tonic-gateNLMISC_KMODS	+= forthdebug
371*7c478bd9Sstevel@tonic-gate
372*7c478bd9Sstevel@tonic-gate#
373*7c478bd9Sstevel@tonic-gate#	Modules eXcluded from the product:
374*7c478bd9Sstevel@tonic-gate#
375*7c478bd9Sstevel@tonic-gateXMODS		+=
376*7c478bd9Sstevel@tonic-gate
377*7c478bd9Sstevel@tonic-gate#
378*7c478bd9Sstevel@tonic-gate#	cpu modules
379*7c478bd9Sstevel@tonic-gate#
380*7c478bd9Sstevel@tonic-gateCPU_KMODS	+= generic niagara
381*7c478bd9Sstevel@tonic-gate
382*7c478bd9Sstevel@tonic-gate#
383*7c478bd9Sstevel@tonic-gate#	Performance Counter BackEnd Modules (/usr/kernel/pcbe):
384*7c478bd9Sstevel@tonic-gate#
385*7c478bd9Sstevel@tonic-gatePCBE_KMODS	+= niagara_pcbe
386