xref: /titanic_50/usr/src/uts/sun4u/starfire/Makefile.starfire (revision 8793b36b40d14ad0a0fecc97738dc118a928f46c)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
542d734fcSkupfer# Common Development and Distribution License (the "License").
642d734fcSkupfer# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*8793b36bSNick Todd# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
2342d734fcSkupfer# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate#	Global definitions for sun4u starfire implementation specific modules.
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gate#
297c478bd9Sstevel@tonic-gate#	Define directories.
307c478bd9Sstevel@tonic-gate#
317c478bd9Sstevel@tonic-gateROOT_STARFIRE_DIR	= $(ROOT_PLAT_DIR)/SUNW,Ultra-Enterprise-10000
327c478bd9Sstevel@tonic-gateROOT_STARFIRE_MOD_DIR	= $(ROOT_STARFIRE_DIR)/kernel
337c478bd9Sstevel@tonic-gateROOT_STARFIRE_KERN_DIR_32 = $(ROOT_STARFIRE_MOD_DIR)
347c478bd9Sstevel@tonic-gateROOT_STARFIRE_KERN_DIR_64 = $(ROOT_STARFIRE_MOD_DIR)/$(SUBDIR64)
357c478bd9Sstevel@tonic-gateROOT_STARFIRE_MISC_DIR_32 = $(ROOT_STARFIRE_MOD_DIR)/misc
367c478bd9Sstevel@tonic-gateROOT_STARFIRE_MISC_DIR_64 = $(ROOT_STARFIRE_MOD_DIR)/misc/$(SUBDIR64)
377c478bd9Sstevel@tonic-gateROOT_STARFIRE_DRV_DIR_32 = $(ROOT_STARFIRE_MOD_DIR)/drv
387c478bd9Sstevel@tonic-gateROOT_STARFIRE_DRV_DIR_64 = $(ROOT_STARFIRE_MOD_DIR)/drv/$(SUBDIR64)
397c478bd9Sstevel@tonic-gateROOT_STARFIRE_CPU_DIR_32 = $(ROOT_STARFIRE_MOD_DIR)/cpu
407c478bd9Sstevel@tonic-gateROOT_STARFIRE_CPU_DIR_64 = $(ROOT_STARFIRE_MOD_DIR)/cpu/$(SUBDIR64)
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gateROOT_STARFIRE_KERN_DIR	= $(ROOT_STARFIRE_KERN_DIR_$(CLASS))
437c478bd9Sstevel@tonic-gateROOT_STARFIRE_MISC_DIR	= $(ROOT_STARFIRE_MISC_DIR_$(CLASS))
447c478bd9Sstevel@tonic-gateROOT_STARFIRE_DRV_DIR	= $(ROOT_STARFIRE_DRV_DIR_$(CLASS))
457c478bd9Sstevel@tonic-gateROOT_STARFIRE_CPU_DIR	= $(ROOT_STARFIRE_CPU_DIR_$(CLASS))
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gateROOT_PLAT_MOD_DIRS	+= $(ROOT_STARFIRE_MOD_DIR)
487c478bd9Sstevel@tonic-gateROOT_PLAT_MISC_DIRS_32	+= $(ROOT_STARFIRE_MISC_DIR_32)
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gateUSR_STARFIRE_DIR	= $(USR_PLAT_DIR)/SUNW,Ultra-Enterprise-10000
517c478bd9Sstevel@tonic-gateUSR_STARFIRE_INC_DIR	= $(USR_STARFIRE_DIR)/include
527c478bd9Sstevel@tonic-gateUSR_STARFIRE_ISYS_DIR	= $(USR_STARFIRE_INC_DIR)/sys
537c478bd9Sstevel@tonic-gateUSR_STARFIRE_SBIN_DIR	= $(USR_STARFIRE_DIR)/sbin
547c478bd9Sstevel@tonic-gateUSR_STARFIRE_LIB_DIR	= $(USR_STARFIRE_DIR)/lib
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gate#
577c478bd9Sstevel@tonic-gate# Define objects.
587c478bd9Sstevel@tonic-gate#
597c478bd9Sstevel@tonic-gateSTARFIRE_OBJS	= starfire.o
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gate#
627c478bd9Sstevel@tonic-gate#	Define modules.
637c478bd9Sstevel@tonic-gate#
647c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	= platmod
657c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	+= rootnex sbus pcipsy
667c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	+= cvc cvcredir
6742d734fcSkupferSTARFIRE_KMODS	+= ngdr ngdrmach
687c478bd9Sstevel@tonic-gateSTARFIRE_KMODS	+= idn
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gate#
717c478bd9Sstevel@tonic-gate#	CPU modules.
727c478bd9Sstevel@tonic-gate#
737c478bd9Sstevel@tonic-gateSTARFIRE_CPU_KMODS += spitfire
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate#
767c478bd9Sstevel@tonic-gate#	Include the makefiles which define build rule templates, the
777c478bd9Sstevel@tonic-gate#	collection of files per module, and a few specific flags. Note
787c478bd9Sstevel@tonic-gate#	that order is significant, just as with an include path. The
797c478bd9Sstevel@tonic-gate#	first build rule template which matches the files name will be
807c478bd9Sstevel@tonic-gate#	used. By including these in order from most machine dependent
817c478bd9Sstevel@tonic-gate#	to most machine independent, we allow a machine dependent file
827c478bd9Sstevel@tonic-gate#	to be used in preference over a machine independent version
837c478bd9Sstevel@tonic-gate#	(Such as a machine specific optimization, which preserves the
847c478bd9Sstevel@tonic-gate#	interfaces.)
857c478bd9Sstevel@tonic-gate#
867c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sun4u/ngdr/Makefile.files
877c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sun4u/starfire/Makefile.files
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate#
907c478bd9Sstevel@tonic-gate#	Include common rules.
917c478bd9Sstevel@tonic-gate#
927c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/sun4u/Makefile.sun4u
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate#
957c478bd9Sstevel@tonic-gate#	Everybody needs to know how to build modstubs.o and to locate unix.o
967c478bd9Sstevel@tonic-gate#
977c478bd9Sstevel@tonic-gateUNIX_DIR	= $(UTSBASE)/$(PLATFORM)/starfire/unix
987c478bd9Sstevel@tonic-gateMODSTUBS_DIR	= $(UNIX_DIR)
997c478bd9Sstevel@tonic-gateDSF_DIR		= $(UTSBASE)/$(PLATFORM)/starfire/genassym
1007c478bd9Sstevel@tonic-gateLINTS_DIR	= $(OBJS_DIR)
1017c478bd9Sstevel@tonic-gateLINT_LIB_DIR	= $(UTSBASE)/$(PLATFORM)/starfire/lint-libs/$(OBJS_DIR)
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gateUNIX_O		= $(UNIX_DIR)/$(OBJS_DIR)/unix.o
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gateLINT_LIB	= $(LINT_LIB_DIR)/llib-lunix.ln
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gate#
1087c478bd9Sstevel@tonic-gate#	Define the actual specific platforms
1097c478bd9Sstevel@tonic-gate#
1107c478bd9Sstevel@tonic-gateMACHINE_DEFS	= -D$(PLATFORM) -D_MACHDEP -DSFMMU
1117c478bd9Sstevel@tonic-gateMACHINE_DEFS	+= -D_STARFIRE -D_CPU_SIGNATURE
1127c478bd9Sstevel@tonic-gate
1137c478bd9Sstevel@tonic-gate#
1147c478bd9Sstevel@tonic-gate#	Define for inline pre-processing since
1157c478bd9Sstevel@tonic-gate#	cpp not smart about v9 yet.
1167c478bd9Sstevel@tonic-gate#
1177c478bd9Sstevel@tonic-gateCPP_DEFS_32	=
1187c478bd9Sstevel@tonic-gateCPP_DEFS_64	= -D__sparcv9
1197c478bd9Sstevel@tonic-gateCPP_DEFS	= $(CPP_DEFS_$(CLASS))
120bb25c06cSjg
121bb25c06cSjg#
122bb25c06cSjg# For now, disable these lint checks; maintainers should endeavor
123bb25c06cSjg# to investigate and remove these for maximum lint coverage.
124bb25c06cSjg# Please do not carry these forward to new Makefiles.
125bb25c06cSjg#
126bb25c06cSjgLINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
127bb25c06cSjgLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
128bb25c06cSjgLINTTAGS	+= -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
129bb25c06cSjgLINTTAGS	+= -erroff=E_STATIC_UNUSED
130bb25c06cSjgLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
131bb25c06cSjgLINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
132*8793b36bSNick ToddLINTTAGS	+= -erroff=E_BAD_FORMAT_STR2
133