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 2009 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
24 # psm/stand/bootlst/common/Makefile.com
27 TOPDIR = ../../../../..
29 include $(TOPDIR)/Makefile.master
30 include $(TOPDIR)/Makefile.psm
31 include $(TOPDIR)/psm/stand/lib/Makefile.lib
33 SYSDIR = $(TOPDIR)/uts
35 STANDDIR = $(TOPDIR)/stand
37 SALIBDIR = $(STANDDIR)/lib/sa
38 SALIB = $(SALIBDIR)/libsa.a
39 PROMLIBDIR= $(PROMIFDIR)/$(ARCH_PROMDIR)
40 PROMLIB = $(PROMLIBDIR)/libprom.a
42 SALIBS += $(SALIB) $(PROMLIB)
43 LDLIBS = -L$(SALIBDIR) -lsa -L$(PROMLIBDIR) -lprom $(LDPLATLIBS)
44 LDFLAGS = -dn -M $(MAPFILE) $(MAP_FLAG)
46 BOOTLSTOBJ += bootlst.o sasubr.o
48 CPPDEFS = -D$(ARCH) -D__$(ARCH) -D$(TARG_MACH) -D__$(TARG_MACH)
49 CPPDEFS += -D_KERNEL -D_MACHDEP -D__ELF
51 CPPINCS = -I$(SYSDIR)/common -I$(SYSDIR)/sun
52 CPPINCS += -I$(SYSDIR)/$(MACH) -I$(PLATDIR)
53 CPPINCS += -I$(STANDDIR)/lib/sa
55 CPPFLAGS = $(CPPDEFS) $(CPPINCS)
56 CPPFLAGS += $(CCYFLAG) -I$(STANDDIR)
58 C99MODE = $(C99_ENABLE)
59 CFLAGS = -O $(C99MODE)
61 ASFLAGS = -D_ASM $(CPPDEFS) -DLOCORE -D_LOCORE
62 AS_CPPFLAGS = $(CPPINCS) $(CPPFLAGS.master)
65 LSTFILES= $(ALL:%=$(ROOT_PSM_DIR)/$(ARCH)/%)
69 $(ROOT_PSM_DIR)/$(ARCH)/%: %
74 install: all $(LSTFILES)
83 .PARALLEL: $(BOOTLSTOBJ)
85 bootlst: $(MAPFILE) $(BOOTLSTOBJ) $(SALIBS)
86 $(LD) $(LDFLAGS) -o $@ $(BOOTLSTOBJ) $(LDLIBS)
90 @cd $(@D); $(MAKE) $(MFLAGS)