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.
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.
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]
21 # Copyright 2010 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
24 # psm/stand/boot/sparcv9/Makefile.com
27 include $(TOPDIR)/psm/stand/boot/Makefile.boot
33 TOP_CMN_DIR = $(SRC)/common
34 CMN_DIR = $(BOOTSRCDIR)/common
35 MACH_DIR = ../../sparc/common
37 BOOT_DIR = $(SRC)/psm/stand/boot
41 NFSBOOT_SRC = $(NFSBOOT).c
45 TOP_CMN_C_SRC = getoptstr.c
49 CMN_C_SRC = heap_kmem.c readfile.c
51 MACH_C_SRC = boot_plat.c bootops.c bootprop.c bootflags.c
52 MACH_C_SRC += machdep.c sun4u_machdep.c sun4v_machdep.c
55 NFSBOOT_OBJS = $(NFSBOOT_SRC:%.c=%.o)
56 NFSBOOT_L_OBJS = $(NFSBOOT_OBJS:%.o=%.ln)
58 CONF_OBJS = $(CONF_SRC:%.c=%.o)
59 CONF_L_OBJS = $(CONF_OBJS:%.o=%.ln)
61 MISC_OBJS = $(MISC_SRC:%.c=%.o)
62 MISC_L_OBJS = $(MISC_OBJS:%.o=%.ln)
64 SRT0_OBJ = $(SRT0_S:%.s=%.o)
65 SRT0_L_OBJ = $(SRT0_OBJ:%.o=%.ln)
67 C_SRC = $(TOP_CMN_C_SRC) $(CMN_C_SRC) $(MACH_C_SRC) $(ARCH_C_SRC)
68 C_SRC += $(PLAT_C_SRC)
69 S_SRC = $(MACH_S_SRC) $(ARCH_S_SRC) $(PLAT_S_SRC)
71 OBJS = $(C_SRC:%.c=%.o) $(S_SRC:%.s=%.o)
72 L_OBJS = $(OBJS:%.o=%.ln)
74 CPPDEFS = $(ARCHOPTS) -D$(PLATFORM) -D_BOOT -D_KERNEL -D_MACHDEP
75 CPPDEFS += -D_ELF64_SUPPORT
76 CPPINCS += -I$(TOP_CMN_DIR)
77 CPPINCS += -I$(SRC)/uts/common
78 CPPINCS += -I$(SRC)/uts/sun
79 CPPINCS += -I$(SRC)/uts/sun4
80 CPPINCS += -I$(SRC)/uts/$(PLATFORM)
81 CPPINCS += -I$(SRC)/uts/sparc/$(ARCHVERS)
82 CPPINCS += -I$(SRC)/uts/sparc
83 CPPINCS += -I$(SRC)/uts/$(ARCHMMU)
84 CPPINCS += -I$(ROOT)/usr/platform/$(PLATFORM)/include
85 CPPINCS += -I$(ROOT)/usr/include/$(ARCHVERS)
86 CPPINCS += -I$(PSMSYSHDRDIR)
87 CPPINCS += -I$(STANDDIR)
88 CPPINCS += -I$(STANDDIR)/lib
89 CPPINCS += -I$(STANDDIR)/lib/sa
90 CPPINCS += -I$(SRC)/common/net/dhcp
91 CPPINCS += -I$(BOOT_DIR)/sparc/common
92 CPPFLAGS = $(CPPDEFS) $(CPPINCS)
93 CPPFLAGS += $(CCYFLAG)$(STANDDIR)
94 ASFLAGS += $(CPPDEFS) -P -D_ASM $(CPPINCS)
95 CFLAGS64 += ../../sparc/common/sparc.il
98 # Where to look for libraries.
100 PSMNAMELIBDIR = $(PSMSTANDDIR)/lib/names/$(TARG_MACH)
101 PSMPROMLIBDIR = $(PSMSTANDDIR)/lib/promif/$(TARG_MACH)
106 USR_PLAT_SUN4U_LIB=$(USR_PLAT_DIR)/sun4u/lib
107 USR_PLAT_SUN4U_LIB_FS=$(USR_PLAT_SUN4U_LIB)/fs
108 USR_PLAT_SUN4U_LIB_FS_NFS=$(USR_PLAT_SUN4U_LIB_FS)/nfs
109 USR_PLAT_SUN4U_LIB_FS_NFS_NFSBOOT=$(USR_PLAT_SUN4U_LIB_FS_NFS)/$(NFSBOOT)
111 USR_PLAT_SUN4V_LIB=$(USR_PLAT_DIR)/sun4v/lib
112 USR_PLAT_SUN4V_LIB_FS=$(USR_PLAT_SUN4V_LIB)/fs
113 USR_PLAT_SUN4V_LIB_FS_NFS=$(USR_PLAT_SUN4V_LIB_FS)/nfs
114 USR_PLAT_SUN4V_LIB_FS_NFS_NFSBOOT=$(USR_PLAT_SUN4V_LIB_FS_NFS)/$(NFSBOOT)
117 # The following libraries are built in LIBNAME_DIR
119 LIBNAME_DIR += $(PSMNAMELIBDIR)/$(PLATFORM)
120 LIBNAME_LIBS += libnames.a
123 # The following libraries are built in LIBPROM_DIR
125 LIBPROM_DIR += $(PSMPROMLIBDIR)/$(PROMVERS)/common
126 LIBPROM_LIBS += libprom.a
129 # The following libraries are built in LIBSYS_DIR
131 LIBSYS_DIR += $(SYSLIBDIR)
136 .PARALLEL: $(OBJS) $(CONF_OBJS) $(MISC_OBJS) $(SRT0_OBJ) \
138 .PARALLEL: $(L_OBJS) $(CONF_L_OBJS) $(MISC_L_OBJS) $(SRT0_L_OBJ) \
140 .PARALLEL: $(NFSBOOT)
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.
147 LIBDEPS= $(LIBPROM_DIR)/libprom.a $(LIBPLAT_DEP) \
148 $(LIBNAME_DIR)/libnames.a
150 L_LIBDEPS= $(LIBPROM_DIR)/llib-lprom.ln $(LIBPLAT_DEP_L) \
151 $(LIBNAME_DIR)/llib-lnames.ln
153 include $(BOOTSRCDIR)/Makefile.rules
154 include $(BOOTSRCDIR)/Makefile.targ