xref: /illumos-gate/usr/src/psm/stand/boot/sparcv9/sun4v/Makefile (revision 59ac0c1669407488b67ae9e273667a340dccc611)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28TOPDIR =	../../../../..
29
30include $(TOPDIR)/uts/Makefile.uts
31
32MODULE	= fs
33
34PLATLINKS	= SUNW,Sun-Fire-T200
35PLATLINKS	+= SUNW,Netra-CP3060
36PLATLINKS	+= SUNW,Sun-Blade-T6300
37PLATLINKS	+= SUNW,Sun-Blade-T6320
38PLATLINKS	+= SUNW,SPARC-Enterprise-T5120
39PLATLINKS	+= SUNW,T5140
40
41LINKED_DIRS	= $(PLATLINKS:%=$(USR_PLAT_DIR)/%)
42LINKED_LIB_DIRS	= $(PLATLINKS:%=$(USR_PLAT_DIR)/%/lib)
43LINKED_LIB_FS_DIRS	= $(PLATLINKS:%=$(USR_PLAT_DIR)/%/lib/fs)
44
45all	:=	TARGET = all
46install	:=	TARGET = install
47clean	:=	TARGET = clean
48
49TARG_MACH =	sparcv9
50TARG_MACH_DIR =	sparcv9
51ARCHVERS =	v9
52PLATFORM =	sun4v
53ARCHMMU  =	sfmmu
54PROMVERS =	ieee1275
55ASFLAGS +=	$(sparcv9_XARCH)
56
57PLAT_C_SRC =	machdep.c
58ARCH_C_SRC =	sun4u_memlist.c sun4x_standalloc.c sun4dep.c
59ARCH_S_SRC =	sparcv9_subr.s
60SRT0_S =	sun4u_srt0.s
61INLINES =
62
63LDFLAGS +=	-L$(TOPDIR)/psm/stand/lib/promif/$(TARG_MACH)/$(PROMVERS)/common
64
65#
66# The following libraries are build in LIBPLAT_DIR
67#
68LIBPLAT_DIR =	$(TOPDIR)/psm/stand/lib/promif/$(TARG_MACH)/$(PROMVERS)/$(PLATFORM)
69LIBPLAT_LIBS =  libplat.a
70LIBPLAT_L_LIBS=	$(LIBPLAT_LIBS:lib%.a=llib-l%.ln)
71LIBPLAT_DEP = 	$(LIBPLAT_DIR)/$(LIBPLAT_LIBS)
72LIBPLAT_DEP_L =	$(LIBPLAT_DIR)/$(LIBPLAT_L_LIBS)
73
74#
75# Platform specific libraries
76#
77PSMLIBS +=      $(LIBPLAT_LIBS:lib%.a=-l%)
78PSMLIB_DIRS +=  $(LIBPLAT_DIR)
79
80
81#	MPSAS support
82MPSAS_BUILD:sh=		echo \\043
83$(MPSAS_BUILD)ARCHOPTS += -DMPSAS
84
85include ../Makefile.com
86
87CPPINCS		+= -I$(SRC)/uts/sun4u
88CPPINCS		+= -I$(ROOT)/usr/platform/sun4u/include
89
90# re-define ELFCONV for 4v--- sun4v can boot ELF directly
91ELFCONV = /usr/bin/cp
92
93# Don't need mapfile.inet for 4v inetboot
94NFS_MAPFILE = $(MACH_DIR)/mapfile
95
96#
97# Set the choice of compiler.
98
99include $(TOPDIR)/psm/Makefile.psm.64
100
101CFLAGS64	+= -xchip=ultra $(CCABS32)
102
103#
104# XXX this totally sucks since it effectively turns off -errchk=longptr64,
105# which we really should be using.
106#
107LINTFLAGS64 = $(LINTFLAGS) -Xarch=v9
108
109#
110# Cross-reference customization: include all boot-related source files.
111#
112STANDLIBDIR=	../../../../../stand/lib
113STANDSYSDIR=	../../../../../stand/sys
114PROMDIRS=	../../../../promif
115NAMESDIRS=	../../../lib/names/sparcv9 ../../../lib/names/sparc/common
116XRDIRS +=	../../sparc/common ../../common $(STANDLIBDIR) \
117		$(STANDSYSDIR) $(PROMDIRS) $(NAMESDIRS)
118XRPRUNE =	i86pc i386
119
120cscope.out tags: FRC
121	$(XREF) -x $@
122
123FRC:
124