xref: /illumos-gate/usr/src/psm/stand/boot/sparcv9/Makefile.com (revision 1a2d662a91cee3bf82f41cd47c7ae6f3825d9db2)
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) -D_ASM $(CPPINCS)
95
96#
97# Where to look for libraries.
98#
99PSMNAMELIBDIR	= $(PSMSTANDDIR)/lib/names/$(TARG_MACH)
100PSMPROMLIBDIR	= $(PSMSTANDDIR)/lib/promif/$(TARG_MACH)
101
102#
103# Install targets
104#
105USR_PLAT_SUN4U_LIB=$(USR_PLAT_DIR)/sun4u/lib
106USR_PLAT_SUN4U_LIB_FS=$(USR_PLAT_SUN4U_LIB)/fs
107USR_PLAT_SUN4U_LIB_FS_NFS=$(USR_PLAT_SUN4U_LIB_FS)/nfs
108USR_PLAT_SUN4U_LIB_FS_NFS_NFSBOOT=$(USR_PLAT_SUN4U_LIB_FS_NFS)/$(NFSBOOT)
109
110USR_PLAT_SUN4V_LIB=$(USR_PLAT_DIR)/sun4v/lib
111USR_PLAT_SUN4V_LIB_FS=$(USR_PLAT_SUN4V_LIB)/fs
112USR_PLAT_SUN4V_LIB_FS_NFS=$(USR_PLAT_SUN4V_LIB_FS)/nfs
113USR_PLAT_SUN4V_LIB_FS_NFS_NFSBOOT=$(USR_PLAT_SUN4V_LIB_FS_NFS)/$(NFSBOOT)
114
115#
116# The following libraries are built in LIBNAME_DIR
117#
118LIBNAME_DIR     += $(PSMNAMELIBDIR)/$(PLATFORM)
119LIBNAME_LIBS    += libnames.a
120
121#
122# The following libraries are built in LIBPROM_DIR
123#
124LIBPROM_DIR     += $(PSMPROMLIBDIR)/$(PROMVERS)/common
125LIBPROM_LIBS    += libprom.a
126
127#
128# The following libraries are built in LIBSYS_DIR
129#
130LIBSYS_DIR      += $(SYSLIBDIR)
131
132#.KEEP_STATE:
133#
134
135.PARALLEL:	$(OBJS) $(CONF_OBJS) $(MISC_OBJS) $(SRT0_OBJ) \
136		$(NFSBOOT_OBJS)
137.PARALLEL:	$(L_OBJS) $(CONF_L_OBJS) $(MISC_L_OBJS) $(SRT0_L_OBJ) \
138		$(NFSBOOT_L_OBJS)
139.PARALLEL:	$(NFSBOOT)
140
141#
142# Note that the presumption is that someone has already done a `make
143# install' from usr/src/stand/lib, such that all of the standalone
144# libraries have been built and placed in $ROOT/stand/lib.
145#
146LIBDEPS=	$(LIBPROM_DIR)/libprom.a $(LIBPLAT_DEP) \
147		$(LIBNAME_DIR)/libnames.a
148
149L_LIBDEPS=	$(LIBPROM_DIR)/llib-lprom.ln $(LIBPLAT_DEP_L) \
150		$(LIBNAME_DIR)/llib-lnames.ln
151
152include $(BOOTSRCDIR)/Makefile.rules
153include $(BOOTSRCDIR)/Makefile.targ
154