xref: /illumos-gate/usr/src/psm/stand/boot/sparcv9/Makefile.com (revision d8109ce4330e1b8ad6c29f9fccacec969066bb9d)
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# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# psm/stand/boot/sparcv9/Makefile.com
25
26
27include $(TOPDIR)/psm/stand/boot/Makefile.boot
28
29TARG_MACH	= sparcv9
30
31BOOTSRCDIR	= ../..
32
33TOP_CMN_DIR	= $(SRC)/common
34CMN_DIR		= $(BOOTSRCDIR)/common
35MACH_DIR	= ../../sparc/common
36PLAT_DIR	= sun4
37BOOT_DIR        = $(SRC)/psm/stand/boot
38
39NFSBOOT		= inetboot
40
41NFSBOOT_SRC	= $(NFSBOOT).c
42
43CONF_SRC	= nfsconf.c
44
45TOP_CMN_C_SRC	= getoptstr.c
46
47MISC_SRC	= ramdisk.c
48
49CMN_C_SRC	= heap_kmem.c readfile.c
50
51MACH_C_SRC	= boot_plat.c bootops.c bootprop.c bootflags.c
52MACH_C_SRC	+= machdep.c sun4u_machdep.c sun4v_machdep.c
53MACH_C_SRC	+= get.c
54
55NFSBOOT_OBJS	= $(NFSBOOT_SRC:%.c=%.o)
56NFSBOOT_L_OBJS	= $(NFSBOOT_OBJS:%.o=%.ln)
57
58CONF_OBJS	= $(CONF_SRC:%.c=%.o)
59CONF_L_OBJS	= $(CONF_OBJS:%.o=%.ln)
60
61MISC_OBJS	= $(MISC_SRC:%.c=%.o)
62MISC_L_OBJS	= $(MISC_OBJS:%.o=%.ln)
63
64SRT0_OBJ	= $(SRT0_S:%.s=%.o)
65SRT0_L_OBJ	= $(SRT0_OBJ:%.o=%.ln)
66
67C_SRC		= $(TOP_CMN_C_SRC) $(CMN_C_SRC) $(MACH_C_SRC) $(ARCH_C_SRC)
68C_SRC		+= $(PLAT_C_SRC)
69S_SRC		= $(MACH_S_SRC) $(ARCH_S_SRC) $(PLAT_S_SRC)
70
71OBJS		= $(C_SRC:%.c=%.o) $(S_SRC:%.s=%.o)
72L_OBJS		= $(OBJS:%.o=%.ln)
73
74CPPDEFS		= $(ARCHOPTS) -D$(PLATFORM) -D_BOOT -D_KERNEL -D_MACHDEP
75CPPDEFS		+= -D_ELF64_SUPPORT
76CPPINCS		+= -I$(TOP_CMN_DIR)
77CPPINCS		+= -I$(SRC)/uts/common
78CPPINCS		+= -I$(SRC)/uts/sun
79CPPINCS		+= -I$(SRC)/uts/sun4
80CPPINCS		+= -I$(SRC)/uts/$(PLATFORM)
81CPPINCS		+= -I$(SRC)/uts/sparc/$(ARCHVERS)
82CPPINCS		+= -I$(SRC)/uts/sparc
83CPPINCS		+= -I$(SRC)/uts/$(ARCHMMU)
84CPPINCS		+= -I$(ROOT)/usr/platform/$(PLATFORM)/include
85CPPINCS		+= -I$(ROOT)/usr/include/$(ARCHVERS)
86CPPINCS		+= -I$(PSMSYSHDRDIR)
87CPPINCS		+= -I$(STANDDIR)
88CPPINCS		+= -I$(STANDDIR)/lib
89CPPINCS		+= -I$(STANDDIR)/lib/sa
90CPPINCS		+= -I$(SRC)/common/net/dhcp
91CPPINCS		+= -I$(BOOT_DIR)/sparc/common
92CPPFLAGS	= $(CPPDEFS) $(CPPINCS)
93CPPFLAGS	+= $(CCYFLAG)$(STANDDIR)
94ASFLAGS		+= $(CPPDEFS) -P -D_ASM $(CPPINCS)
95CFLAGS64	+= ../../sparc/common/sparc.il
96
97#
98# Where to look for libraries.
99#
100PSMNAMELIBDIR	= $(PSMSTANDDIR)/lib/names/$(TARG_MACH)
101PSMPROMLIBDIR	= $(PSMSTANDDIR)/lib/promif/$(TARG_MACH)
102
103#
104# Install targets
105#
106USR_PLAT_SUN4U_LIB=$(USR_PLAT_DIR)/sun4u/lib
107USR_PLAT_SUN4U_LIB_FS=$(USR_PLAT_SUN4U_LIB)/fs
108USR_PLAT_SUN4U_LIB_FS_NFS=$(USR_PLAT_SUN4U_LIB_FS)/nfs
109USR_PLAT_SUN4U_LIB_FS_NFS_NFSBOOT=$(USR_PLAT_SUN4U_LIB_FS_NFS)/$(NFSBOOT)
110
111USR_PLAT_SUN4V_LIB=$(USR_PLAT_DIR)/sun4v/lib
112USR_PLAT_SUN4V_LIB_FS=$(USR_PLAT_SUN4V_LIB)/fs
113USR_PLAT_SUN4V_LIB_FS_NFS=$(USR_PLAT_SUN4V_LIB_FS)/nfs
114USR_PLAT_SUN4V_LIB_FS_NFS_NFSBOOT=$(USR_PLAT_SUN4V_LIB_FS_NFS)/$(NFSBOOT)
115
116#
117# The following libraries are built in LIBNAME_DIR
118#
119LIBNAME_DIR     += $(PSMNAMELIBDIR)/$(PLATFORM)
120LIBNAME_LIBS    += libnames.a
121
122#
123# The following libraries are built in LIBPROM_DIR
124#
125LIBPROM_DIR     += $(PSMPROMLIBDIR)/$(PROMVERS)/common
126LIBPROM_LIBS    += libprom.a
127
128#
129# The following libraries are built in LIBSYS_DIR
130#
131LIBSYS_DIR      += $(SYSLIBDIR)
132
133#.KEEP_STATE:
134#
135
136.PARALLEL:	$(OBJS) $(CONF_OBJS) $(MISC_OBJS) $(SRT0_OBJ) \
137		$(NFSBOOT_OBJS)
138.PARALLEL:	$(L_OBJS) $(CONF_L_OBJS) $(MISC_L_OBJS) $(SRT0_L_OBJ) \
139		$(NFSBOOT_L_OBJS)
140.PARALLEL:	$(NFSBOOT)
141
142#
143# Note that the presumption is that someone has already done a `make
144# install' from usr/src/stand/lib, such that all of the standalone
145# libraries have been built and placed in $ROOT/stand/lib.
146#
147LIBDEPS=	$(LIBPROM_DIR)/libprom.a $(LIBPLAT_DEP) \
148		$(LIBNAME_DIR)/libnames.a
149
150L_LIBDEPS=	$(LIBPROM_DIR)/llib-lprom.ln $(LIBPLAT_DEP_L) \
151		$(LIBNAME_DIR)/llib-lnames.ln
152
153include $(BOOTSRCDIR)/Makefile.rules
154include $(BOOTSRCDIR)/Makefile.targ
155