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