xref: /titanic_52/usr/src/psm/stand/boot/sparcv9/sun4v/Makefile (revision b6c3f7863936abeae522e48a13887dddeb691a45)
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,Netra-CP3260
37PLATLINKS	+= SUNW,Sun-Blade-T6300
38PLATLINKS	+= SUNW,Sun-Blade-T6320
39PLATLINKS	+= SUNW,SPARC-Enterprise-T5120
40PLATLINKS	+= SUNW,T5140
41PLATLINKS	+= SUNW,USBRDT-5240
42PLATLINKS	+= SUNW,Netra-T5220
43PLATLINKS	+= SUNW,Netra-T5440
44
45LINKED_DIRS	= $(PLATLINKS:%=$(USR_PLAT_DIR)/%)
46LINKED_LIB_DIRS	= $(PLATLINKS:%=$(USR_PLAT_DIR)/%/lib)
47LINKED_LIB_FS_DIRS	= $(PLATLINKS:%=$(USR_PLAT_DIR)/%/lib/fs)
48
49all	:=	TARGET = all
50install	:=	TARGET = install
51clean	:=	TARGET = clean
52
53TARG_MACH =	sparcv9
54TARG_MACH_DIR =	sparcv9
55ARCHVERS =	v9
56PLATFORM =	sun4v
57ARCHMMU  =	sfmmu
58PROMVERS =	ieee1275
59ASFLAGS +=	$(sparcv9_XARCH)
60
61PLAT_C_SRC =	machdep.c
62ARCH_C_SRC =	sun4u_memlist.c sun4x_standalloc.c sun4dep.c
63ARCH_S_SRC =	sparcv9_subr.s
64SRT0_S =	sun4u_srt0.s
65INLINES =
66
67LDFLAGS +=	-L$(TOPDIR)/psm/stand/lib/promif/$(TARG_MACH)/$(PROMVERS)/common
68
69#
70# The following libraries are build in LIBPLAT_DIR
71#
72LIBPLAT_DIR =	$(TOPDIR)/psm/stand/lib/promif/$(TARG_MACH)/$(PROMVERS)/$(PLATFORM)
73LIBPLAT_LIBS =  libplat.a
74LIBPLAT_L_LIBS=	$(LIBPLAT_LIBS:lib%.a=llib-l%.ln)
75LIBPLAT_DEP = 	$(LIBPLAT_DIR)/$(LIBPLAT_LIBS)
76LIBPLAT_DEP_L =	$(LIBPLAT_DIR)/$(LIBPLAT_L_LIBS)
77
78#
79# Platform specific libraries
80#
81PSMLIBS +=      $(LIBPLAT_LIBS:lib%.a=-l%)
82PSMLIB_DIRS +=  $(LIBPLAT_DIR)
83
84
85#	MPSAS support
86MPSAS_BUILD:sh=		echo \\043
87$(MPSAS_BUILD)ARCHOPTS += -DMPSAS
88
89include ../Makefile.com
90
91CPPINCS		+= -I$(SRC)/uts/sun4u
92CPPINCS		+= -I$(ROOT)/usr/platform/sun4u/include
93
94# re-define ELFCONV for 4v--- sun4v can boot ELF directly
95ELFCONV = /usr/bin/cp
96
97# Don't need mapfile.inet for 4v inetboot
98NFS_MAPFILE = $(MACH_DIR)/mapfile
99
100#
101# Set the choice of compiler.
102
103include $(TOPDIR)/psm/Makefile.psm.64
104
105CFLAGS64	+= -xchip=ultra $(CCABS32)
106
107#
108# XXX this totally sucks since it effectively turns off -errchk=longptr64,
109# which we really should be using.
110#
111LINTFLAGS64 = $(LINTFLAGS) -Xarch=v9
112
113#
114# Cross-reference customization: include all boot-related source files.
115#
116STANDLIBDIR=	../../../../../stand/lib
117STANDSYSDIR=	../../../../../stand/sys
118PROMDIRS=	../../../../promif
119NAMESDIRS=	../../../lib/names/sparcv9 ../../../lib/names/sparc/common
120XRDIRS +=	../../sparc/common ../../common $(STANDLIBDIR) \
121		$(STANDSYSDIR) $(PROMDIRS) $(NAMESDIRS)
122XRPRUNE =	i86pc i386
123
124cscope.out tags: FRC
125	$(XREF) -x $@
126
127FRC:
128