Makefile revision ecb56eb0ffe7dd69b90f2aa3f3be470eca3ecc28
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER START
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# The contents of this file are subject to the terms of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Common Development and Distribution License (the "License").
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You may not use this file except in compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# or http://www.opensolaris.org/os/licensing.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# See the License for the specific language governing permissions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# When distributing Covered Code, include this CDDL HEADER in each
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# If applicable, add the following below this CDDL HEADER, with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# fields enclosed by brackets "[]" replaced with your own identifying
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# information: Portions Copyright [yyyy] [name of copyright owner]
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER END
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Use is subject to license terms.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#ident "%Z%%M% %I% %E% SMI"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
fd21d481e26774c37a197c7cc8ab56096a21e7aaPhill Cunnington
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterTOPDIR = ../../../../..
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinclude $(TOPDIR)/uts/Makefile.uts
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
fc8409d20f991d53ac0c4708efa04c121b73c449Tom RumseyMODULE = fs
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey
87d68743726585ee101ba2e7be2cf06cd34ebb80Neil MaddenPLATLINKS = SUNW,Sun-Fire-T200
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyPLATLINKS += SUNW,Netra-CP3060
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyPLATLINKS += SUNW,Sun-Blade-T6300
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyPLATLINKS += SUNW,Sun-Blade-T6320
26304a2a091af368cfc16c977bcce6d17195360aTom Rumsey
997d6667b8c483bf582a231b1b24f84fbe6c8390Neil MaddenLINKED_DIRS = $(PLATLINKS:%=$(USR_PLAT_DIR)/%)
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyLINKED_LIB_DIRS = $(PLATLINKS:%=$(USR_PLAT_DIR)/%/lib)
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyLINKED_LIB_FS_DIRS = $(PLATLINKS:%=$(USR_PLAT_DIR)/%/lib/fs)
26304a2a091af368cfc16c977bcce6d17195360aTom Rumsey
26304a2a091af368cfc16c977bcce6d17195360aTom Rumseyall := TARGET = all
26304a2a091af368cfc16c977bcce6d17195360aTom Rumseyinstall := TARGET = install
a90aba9cbcbb8e7fe95e45590d853959efe0d354Tom Rumseyclean := TARGET = clean
26304a2a091af368cfc16c977bcce6d17195360aTom Rumsey
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyTARG_MACH = sparcv9
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyTARG_MACH_DIR = sparcv9
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyARCHVERS = v9
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyPLATFORM = sun4v
42c10b520a70c6b2c67ad812cfda98ac1663f0c5Craig McDonnellARCHMMU = sfmmu
42c10b520a70c6b2c67ad812cfda98ac1663f0c5Craig McDonnellPROMVERS = ieee1275
26304a2a091af368cfc16c977bcce6d17195360aTom RumseyASFLAGS += $(sparcv9_XARCH)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
3cfef899c650ea8fa23c64ad5a66b8986bf77bb2Tom RumseyPLAT_C_SRC = machdep.c
72450cb9c2ca854c6d3479832c2738196c1d3282Robert WapshottARCH_C_SRC = sun4u_memlist.c sun4x_standalloc.c sun4dep.c
72450cb9c2ca854c6d3479832c2738196c1d3282Robert WapshottARCH_S_SRC = sparcv9_subr.s
72450cb9c2ca854c6d3479832c2738196c1d3282Robert WapshottSRT0_S = sun4u_srt0.s
3cfef899c650ea8fa23c64ad5a66b8986bf77bb2Tom RumseyINLINES =
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnell
7b3fa0c4c626865e92012ef9f885e91d945850eaCraig McDonnellLDFLAGS += -L$(TOPDIR)/psm/stand/lib/promif/$(TARG_MACH)/$(PROMVERS)/common
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# The following libraries are build in LIBPLAT_DIR
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
01a939641aeb0a095851921879620c3fab295cb2Robert WapshottLIBPLAT_DIR = $(TOPDIR)/psm/stand/lib/promif/$(TARG_MACH)/$(PROMVERS)/$(PLATFORM)
01a939641aeb0a095851921879620c3fab295cb2Robert WapshottLIBPLAT_LIBS = libplat.a
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterLIBPLAT_L_LIBS= $(LIBPLAT_LIBS:lib%.a=llib-l%.ln)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterLIBPLAT_DEP = $(LIBPLAT_DIR)/$(LIBPLAT_LIBS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterLIBPLAT_DEP_L = $(LIBPLAT_DIR)/$(LIBPLAT_L_LIBS)
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Platform specific libraries
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPSMLIBS += $(LIBPLAT_LIBS:lib%.a=-l%)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPSMLIB_DIRS += $(LIBPLAT_DIR)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
0c893a059f84246bf91e2f0fbf63e4c92f8e5165Tony Bamford# MPSAS support
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterMPSAS_BUILD:sh= echo \\043
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$(MPSAS_BUILD)ARCHOPTS += -DMPSAS
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinclude ../Makefile.com
a90aba9cbcbb8e7fe95e45590d853959efe0d354Tom Rumsey
321cc59fdbbb9b6eebdfc714f2d86b785965d50eTom RumseyCPPINCS += -I$(SRC)/uts/sun4u
321cc59fdbbb9b6eebdfc714f2d86b785965d50eTom RumseyCPPINCS += -I$(ROOT)/usr/platform/sun4u/include
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey# re-define ELFCONV for 4v--- sun4v can boot ELF directly
fc8409d20f991d53ac0c4708efa04c121b73c449Tom RumseyELFCONV = /usr/bin/cp
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey# Don't need mapfile.inet for 4v inetboot
fc8409d20f991d53ac0c4708efa04c121b73c449Tom RumseyNFS_MAPFILE = $(MACH_DIR)/mapfile
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey#
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey# Set the choice of compiler.
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumsey
fc8409d20f991d53ac0c4708efa04c121b73c449Tom Rumseyinclude $(TOPDIR)/psm/Makefile.psm.64
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterCFLAGS64 += -xchip=ultra $(CCABS32)
7b3fa0c4c626865e92012ef9f885e91d945850eaCraig McDonnell
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
7b3fa0c4c626865e92012ef9f885e91d945850eaCraig McDonnell# XXX this totally sucks since it effectively turns off -errchk=longptr64,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# which we really should be using.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterLINTFLAGS64 = $(LINTFLAGS) -Xarch=v9
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Cross-reference customization: include all boot-related source files.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterSTANDLIBDIR= ../../../../../stand/lib
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterSTANDSYSDIR= ../../../../../stand/sys
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPROMDIRS= ../../../../promif
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterNAMESDIRS= ../../../lib/names/sparcv9 ../../../lib/names/sparc/common
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterXRDIRS += ../../sparc/common ../../common $(STANDLIBDIR) \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(STANDSYSDIR) $(PROMDIRS) $(NAMESDIRS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterXRPRUNE = i86pc i386
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostercscope.out tags: FRC
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(XREF) -x $@
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterFRC:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster