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