xref: /titanic_50/usr/src/uts/sun4u/starfire/Makefile.starfire (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 (c) 1997-2001 by Sun Microsystems, Inc.
24*7c478bd9Sstevel@tonic-gate# All rights reserved.
25*7c478bd9Sstevel@tonic-gate#
26*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate#	Global definitions for sun4u starfire implementation specific modules.
29*7c478bd9Sstevel@tonic-gate#
30*7c478bd9Sstevel@tonic-gate
31*7c478bd9Sstevel@tonic-gate#
32*7c478bd9Sstevel@tonic-gate#	Define directories.
33*7c478bd9Sstevel@tonic-gate#
34*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_DIR	= $(ROOT_PLAT_DIR)/SUNW,Ultra-Enterprise-10000
35*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_MOD_DIR	= $(ROOT_STARFIRE_DIR)/kernel
36*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_KERN_DIR_32 = $(ROOT_STARFIRE_MOD_DIR)
37*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_KERN_DIR_64 = $(ROOT_STARFIRE_MOD_DIR)/$(SUBDIR64)
38*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_MISC_DIR_32 = $(ROOT_STARFIRE_MOD_DIR)/misc
39*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_MISC_DIR_64 = $(ROOT_STARFIRE_MOD_DIR)/misc/$(SUBDIR64)
40*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_DRV_DIR_32 = $(ROOT_STARFIRE_MOD_DIR)/drv
41*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_DRV_DIR_64 = $(ROOT_STARFIRE_MOD_DIR)/drv/$(SUBDIR64)
42*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_CPU_DIR_32 = $(ROOT_STARFIRE_MOD_DIR)/cpu
43*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_CPU_DIR_64 = $(ROOT_STARFIRE_MOD_DIR)/cpu/$(SUBDIR64)
44*7c478bd9Sstevel@tonic-gate
45*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_KERN_DIR	= $(ROOT_STARFIRE_KERN_DIR_$(CLASS))
46*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_MISC_DIR	= $(ROOT_STARFIRE_MISC_DIR_$(CLASS))
47*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_DRV_DIR	= $(ROOT_STARFIRE_DRV_DIR_$(CLASS))
48*7c478bd9Sstevel@tonic-gateROOT_STARFIRE_CPU_DIR	= $(ROOT_STARFIRE_CPU_DIR_$(CLASS))
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gateROOT_PLAT_MOD_DIRS	+= $(ROOT_STARFIRE_MOD_DIR)
51*7c478bd9Sstevel@tonic-gateROOT_PLAT_MISC_DIRS_32	+= $(ROOT_STARFIRE_MISC_DIR_32)
52*7c478bd9Sstevel@tonic-gate
53*7c478bd9Sstevel@tonic-gateUSR_STARFIRE_DIR	= $(USR_PLAT_DIR)/SUNW,Ultra-Enterprise-10000
54*7c478bd9Sstevel@tonic-gateUSR_STARFIRE_INC_DIR	= $(USR_STARFIRE_DIR)/include
55*7c478bd9Sstevel@tonic-gateUSR_STARFIRE_ISYS_DIR	= $(USR_STARFIRE_INC_DIR)/sys
56*7c478bd9Sstevel@tonic-gateUSR_STARFIRE_SBIN_DIR	= $(USR_STARFIRE_DIR)/sbin
57*7c478bd9Sstevel@tonic-gateUSR_STARFIRE_LIB_DIR	= $(USR_STARFIRE_DIR)/lib
58*7c478bd9Sstevel@tonic-gate
59*7c478bd9Sstevel@tonic-gate#
60*7c478bd9Sstevel@tonic-gate# Define objects.
61*7c478bd9Sstevel@tonic-gate#
62*7c478bd9Sstevel@tonic-gateSTARFIRE_OBJS	= starfire.o
63*7c478bd9Sstevel@tonic-gate
64*7c478bd9Sstevel@tonic-gate#
65*7c478bd9Sstevel@tonic-gate#	Define modules.
66*7c478bd9Sstevel@tonic-gate#
67*7c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	= platmod
68*7c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	+= rootnex sbus pcipsy
69*7c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	+= cvc cvcredir
70*7c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	+= ngdr .WAIT ngdrmach
71*7c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	+= idn
72*7c478bd9Sstevel@tonic-gate
73*7c478bd9Sstevel@tonic-gate#
74*7c478bd9Sstevel@tonic-gate#	CPU modules.
75*7c478bd9Sstevel@tonic-gate#
76*7c478bd9Sstevel@tonic-gateSTARFIRE_CPU_KMODS += spitfire
77*7c478bd9Sstevel@tonic-gate
78*7c478bd9Sstevel@tonic-gate#
79*7c478bd9Sstevel@tonic-gate#	Include the makefiles which define build rule templates, the
80*7c478bd9Sstevel@tonic-gate#	collection of files per module, and a few specific flags. Note
81*7c478bd9Sstevel@tonic-gate#	that order is significant, just as with an include path. The
82*7c478bd9Sstevel@tonic-gate#	first build rule template which matches the files name will be
83*7c478bd9Sstevel@tonic-gate#	used. By including these in order from most machine dependent
84*7c478bd9Sstevel@tonic-gate#	to most machine independent, we allow a machine dependent file
85*7c478bd9Sstevel@tonic-gate#	to be used in preference over a machine independent version
86*7c478bd9Sstevel@tonic-gate#	(Such as a machine specific optimization, which preserves the
87*7c478bd9Sstevel@tonic-gate#	interfaces.)
88*7c478bd9Sstevel@tonic-gate#
89*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sun4u/ngdr/Makefile.files
90*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sun4u/starfire/Makefile.files
91*7c478bd9Sstevel@tonic-gate
92*7c478bd9Sstevel@tonic-gate#
93*7c478bd9Sstevel@tonic-gate#	Include common rules.
94*7c478bd9Sstevel@tonic-gate#
95*7c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sun4u/Makefile.sun4u
96*7c478bd9Sstevel@tonic-gate
97*7c478bd9Sstevel@tonic-gate#
98*7c478bd9Sstevel@tonic-gate#	Everybody needs to know how to build modstubs.o and to locate unix.o
99*7c478bd9Sstevel@tonic-gate#
100*7c478bd9Sstevel@tonic-gateUNIX_DIR	= $(UTSBASE)/$(PLATFORM)/starfire/unix
101*7c478bd9Sstevel@tonic-gateMODSTUBS_DIR	= $(UNIX_DIR)
102*7c478bd9Sstevel@tonic-gateDSF_DIR		= $(UTSBASE)/$(PLATFORM)/starfire/genassym
103*7c478bd9Sstevel@tonic-gateLINTS_DIR	= $(OBJS_DIR)
104*7c478bd9Sstevel@tonic-gateLINT_LIB_DIR	= $(UTSBASE)/$(PLATFORM)/starfire/lint-libs/$(OBJS_DIR)
105*7c478bd9Sstevel@tonic-gate
106*7c478bd9Sstevel@tonic-gateUNIX_O		= $(UNIX_DIR)/$(OBJS_DIR)/unix.o
107*7c478bd9Sstevel@tonic-gate
108*7c478bd9Sstevel@tonic-gateLINT_LIB	= $(LINT_LIB_DIR)/llib-lunix.ln
109*7c478bd9Sstevel@tonic-gate
110*7c478bd9Sstevel@tonic-gate#
111*7c478bd9Sstevel@tonic-gate#	The following must be defined for all implementations:
112*7c478bd9Sstevel@tonic-gate#
113*7c478bd9Sstevel@tonic-gate#	MAPFILE:	ld mapfile for the build of kernel/unix.
114*7c478bd9Sstevel@tonic-gate#	MODSTUBS:	Module stubs source file.
115*7c478bd9Sstevel@tonic-gate#
116*7c478bd9Sstevel@tonic-gateMAPFILE		= $(UTSBASE)/sun4u/conf/Mapfile
117*7c478bd9Sstevel@tonic-gateMODSTUBS	= $(UTSBASE)/sparc/ml/modstubs.s
118*7c478bd9Sstevel@tonic-gate
119*7c478bd9Sstevel@tonic-gate#
120*7c478bd9Sstevel@tonic-gate#	Define the actual specific platforms
121*7c478bd9Sstevel@tonic-gate#
122*7c478bd9Sstevel@tonic-gateMACHINE_DEFS	= -D$(PLATFORM) -D_MACHDEP -DSFMMU
123*7c478bd9Sstevel@tonic-gateMACHINE_DEFS	+= -D_STARFIRE -D_CPU_SIGNATURE
124*7c478bd9Sstevel@tonic-gate
125*7c478bd9Sstevel@tonic-gate#
126*7c478bd9Sstevel@tonic-gate#	Define for inline pre-processing since
127*7c478bd9Sstevel@tonic-gate#	cpp not smart about v9 yet.
128*7c478bd9Sstevel@tonic-gate#
129*7c478bd9Sstevel@tonic-gateCPP_DEFS_32	=
130*7c478bd9Sstevel@tonic-gateCPP_DEFS_64	= -D__sparcv9
131*7c478bd9Sstevel@tonic-gateCPP_DEFS	= $(CPP_DEFS_$(CLASS))
132