dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / psm / stand / bootlst / common / Makefile.com
blob003dbee08ad99b662df0bd3775d1cca3f43c38ea
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
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
34 COMDIR  =       ../../common
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)
64 # install values
65 LSTFILES=       $(ALL:%=$(ROOT_PSM_DIR)/$(ARCH)/%)
66 FILEMODE=       644
68 # install rule
69 $(ROOT_PSM_DIR)/$(ARCH)/%: %
70         $(INS.file)
72 all:    $(ALL)
74 install: all $(LSTFILES)
76 # build rules
78 %.o: $(COMDIR)/%.c
79         $(COMPILE.c) -o $@ $<
81 .KEEP_STATE:
83 .PARALLEL:      $(BOOTLSTOBJ)
85 bootlst: $(MAPFILE) $(BOOTLSTOBJ) $(SALIBS)
86         $(LD) $(LDFLAGS) -o $@ $(BOOTLSTOBJ) $(LDLIBS)
87         $(POST_PROCESS)
89 $(SALIBS): FRC
90         @cd $(@D); $(MAKE) $(MFLAGS)
92 $(ROOTDIR):
93         $(INS.dir)
95 clean:
96         $(RM) *.o *.ln
98 clobber:
99         $(RM) *.o *.ln $(ALL)
101 FRC: