Print this page
3946 ::gcore
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>


   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 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #


  25 
  26 .KEEP_STATE:
  27 .SUFFIXES:
  28 
  29 include $(SRC)/cmd/mdb/Makefile.tools
  30 
  31 $(KMOD_SOURCES_DIFFERENT)KMODSRCS = $(MODSRCS)
  32 
  33 MODOBJS = $(MODSRCS:%.c=dmod/%.o)
  34 KMODOBJS = $(KMODSRCS:%.c=kmod/%.o)
  35 
  36 MODNAME = $(MODULE:%.so=%)
  37 KMODULE = $(MODNAME)
  38 
  39 MODFILE = dmod/$(MODULE)
  40 KMODFILE = kmod/$(KMODULE)
  41 
  42 #
  43 # The mess below is designed to pick the right set of objects to build and/or
  44 # lint.  We have three flavors:


  76 ROOTTGTS_kvm            = $(ROOTTGTS_kvm_$(ROOTTGTS_kvm_type))
  77 ROOTTGTS_proc           = $(ROOTMOD)/$(MODULE)
  78 ROOTTGTS_raw            = $(ROOTMOD)/$(MODULE)
  79 ROOTTGTS                = $(ROOTTGTS_$(MDBTGT))
  80 
  81 # What should we lint?
  82 KLINTOBJS               = $(KMODOBJS:%.o=%.ln)
  83 LINTOBJS                = $(MODOBJS:%.o=%.ln)
  84 
  85 LINTFILES_kvm_type      = $(TARGETS_kvm_type)
  86 LINTFILES_kvm_both      = $(KLINTOBJS) $(LINTOBJS)
  87 LINTFILES_kvm_mdb       = $(LINTOBJS)
  88 LINTFILES_kvm           = $(LINTFILES_kvm_$(LINTFILES_kvm_type))
  89 LINTFILES_proc          = $(LINTOBJS)
  90 LINTFILES_raw           = $(LINTOBJS)
  91 LINTFILES               = $(LINTFILES_$(MDBTGT))
  92 
  93 kvm_TGTFLAGS            = -D_KERNEL
  94 proc_TGTFLAGS           = -D_USER
  95 


  96 CFLAGS                  += $(CCVERBOSE)
  97 CFLAGS64                += $(CCVERBOSE)
  98 CPPFLAGS                += $($(MDBTGT)_TGTFLAGS) -I../../../common
  99 LDFLAGS                 += $(ZTEXT)
 100 LDFLAGS64               += $(ZTEXT)
 101 
 102 # Module type-specific compiler flags
 103 $(MODOBJS) :=                   CFLAGS += $(C_BIGPICFLAGS) $(XREGSFLAG)
 104 $(MODOBJS) :=                   CFLAGS64 += $(C_BIGPICFLAGS) $(XREGSFLAG)
 105 $(KMODOBJS) $(KLINTOBJS) :=     CPPFLAGS += -D_KMDB
 106 $(KMODOBJS) :=                  V9CODESIZE = $(CCABS32)
 107 $(KMODOBJS) :=                  DTS_ERRNO =
 108 
 109 # Modules aren't allowed to export symbols
 110 MAPFILE         = $(SRC)/cmd/mdb/common/modules/conf/mapfile
 111 
 112 # Modules typically make external references.  To provide for -zdefs use
 113 # and clean ldd(1) processing, explicitly define all external references.
 114 MAPFILE-EXT     = $(SRC)/cmd/mdb/common/modules/conf/mapfile-extern
 115 




   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 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright (c) 2013 by Delphix. All rights reserved.
  26 #
  27 
  28 .KEEP_STATE:
  29 .SUFFIXES:
  30 
  31 include $(SRC)/cmd/mdb/Makefile.tools
  32 
  33 $(KMOD_SOURCES_DIFFERENT)KMODSRCS = $(MODSRCS)
  34 
  35 MODOBJS = $(MODSRCS:%.c=dmod/%.o)
  36 KMODOBJS = $(KMODSRCS:%.c=kmod/%.o)
  37 
  38 MODNAME = $(MODULE:%.so=%)
  39 KMODULE = $(MODNAME)
  40 
  41 MODFILE = dmod/$(MODULE)
  42 KMODFILE = kmod/$(KMODULE)
  43 
  44 #
  45 # The mess below is designed to pick the right set of objects to build and/or
  46 # lint.  We have three flavors:


  78 ROOTTGTS_kvm            = $(ROOTTGTS_kvm_$(ROOTTGTS_kvm_type))
  79 ROOTTGTS_proc           = $(ROOTMOD)/$(MODULE)
  80 ROOTTGTS_raw            = $(ROOTMOD)/$(MODULE)
  81 ROOTTGTS                = $(ROOTTGTS_$(MDBTGT))
  82 
  83 # What should we lint?
  84 KLINTOBJS               = $(KMODOBJS:%.o=%.ln)
  85 LINTOBJS                = $(MODOBJS:%.o=%.ln)
  86 
  87 LINTFILES_kvm_type      = $(TARGETS_kvm_type)
  88 LINTFILES_kvm_both      = $(KLINTOBJS) $(LINTOBJS)
  89 LINTFILES_kvm_mdb       = $(LINTOBJS)
  90 LINTFILES_kvm           = $(LINTFILES_kvm_$(LINTFILES_kvm_type))
  91 LINTFILES_proc          = $(LINTOBJS)
  92 LINTFILES_raw           = $(LINTOBJS)
  93 LINTFILES               = $(LINTFILES_$(MDBTGT))
  94 
  95 kvm_TGTFLAGS            = -D_KERNEL
  96 proc_TGTFLAGS           = -D_USER
  97 
  98 C99MODE                 = $(C99_ENABLE)
  99 
 100 CFLAGS                  += $(CCVERBOSE)
 101 CFLAGS64                += $(CCVERBOSE)
 102 CPPFLAGS                += $($(MDBTGT)_TGTFLAGS) -I../../../common
 103 LDFLAGS                 += $(ZTEXT)
 104 LDFLAGS64               += $(ZTEXT)
 105 
 106 # Module type-specific compiler flags
 107 $(MODOBJS) :=                   CFLAGS += $(C_BIGPICFLAGS) $(XREGSFLAG)
 108 $(MODOBJS) :=                   CFLAGS64 += $(C_BIGPICFLAGS) $(XREGSFLAG)
 109 $(KMODOBJS) $(KLINTOBJS) :=     CPPFLAGS += -D_KMDB
 110 $(KMODOBJS) :=                  V9CODESIZE = $(CCABS32)
 111 $(KMODOBJS) :=                  DTS_ERRNO =
 112 
 113 # Modules aren't allowed to export symbols
 114 MAPFILE         = $(SRC)/cmd/mdb/common/modules/conf/mapfile
 115 
 116 # Modules typically make external references.  To provide for -zdefs use
 117 # and clean ldd(1) processing, explicitly define all external references.
 118 MAPFILE-EXT     = $(SRC)/cmd/mdb/common/modules/conf/mapfile-extern
 119