hotspot/make/linux/makefiles/vm.make

Print this page




  23 #
  24 
  25 # Rules to build JVM and related libraries, included from vm.make in the build
  26 # directory.
  27 
  28 # Common build rules.
  29 MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
  30 include $(MAKEFILES_DIR)/rules.make
  31 
  32 default: build
  33 
  34 #----------------------------------------------------------------------
  35 # Defs
  36 
  37 GENERATED     = ../generated
  38 
  39 # read a generated file defining the set of .o's and the .o .h dependencies
  40 include $(GENERATED)/Dependencies
  41 
  42 # read machine-specific adjustments (%%% should do this via buildtree.make?)
  43 include $(MAKEFILES_DIR)/$(BUILDARCH).make




  44 
  45 # set VPATH so make knows where to look for source files
  46 # Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
  47 # The incls directory contains generated header file lists for inclusion.
  48 # The adfiles directory contains ad_<arch>.[ch]pp.
  49 # The jvmtifiles directory contains jvmti*.[ch]pp
  50 Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls
  51 VPATH    += $(Src_Dirs_V:%=%:)
  52 
  53 # set INCLUDES for C preprocessor
  54 Src_Dirs_I = $(PRECOMPILED_HEADER_DIR) $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)
  55 INCLUDES += $(Src_Dirs_I:%=-I%)
  56 
  57 ifeq (${VERSION}, debug)
  58   SYMFLAG = -g
  59 else
  60   SYMFLAG =
  61 endif
  62 
  63 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined 


 107 include $(MAKEFILES_DIR)/dtrace.make
 108 
 109 #----------------------------------------------------------------------
 110 # JVM
 111 
 112 JVM    = jvm$(G_SUFFIX)
 113 LIBJVM = lib$(JVM).so
 114 
 115 JVM_OBJ_FILES = $(Obj_Files)
 116 
 117 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
 118 
 119 mapfile : $(MAPFILE)
 120         rm -f $@
 121         cat $^ > $@
 122 
 123 mapfile_reorder : mapfile $(REORDERFILE)
 124         rm -f $@
 125         cat $^ > $@
 126 
 127 STATIC_CXX = true




 128 
 129 ifeq ($(LINK_INTO),AOUT)
 130   LIBJVM.o                 =
 131   LIBJVM_MAPFILE           =
 132   LIBS_VM                  = $(LIBS)
 133 else
 134   LIBJVM.o                 = $(JVM_OBJ_FILES)
 135   LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
 136   LFLAGS_VM$(LDNOMAP)      += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
 137   LFLAGS_VM                += $(SONAMEFLAG:SONAME=$(LIBJVM))
 138 
 139   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
 140   # get around library dependency and compatibility issues. Must use gcc not
 141   # g++ to link.
 142   ifeq ($(STATIC_CXX), true)
 143     LFLAGS_VM              += $(STATIC_LIBGCC)
 144     LIBS_VM                += $(STATIC_STDCXX)
 145   else
 146     LIBS_VM                += -lstdc++
 147   endif
 148 
 149   LIBS_VM                  += $(LIBS)
 150 endif



 151 
 152 LINK_VM = $(LINK_LIB.c)
 153 
 154 # rule for building precompiled header
 155 $(PRECOMPILED_HEADER): $(Precompiled_Files)
 156         $(QUIETLY) echo Generating precompiled header $@
 157         $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)/incls
 158         $(QUIETLY) $(COMPILE.CC) -x c++-header -c $(GENERATED)/incls/_precompiled.incl -o $@ $(COMPILE_DONE)
 159 
 160 # making the library:
 161 
 162 ifneq ($(JVM_BASE_ADDR),)
 163 # By default shared library is linked at base address == 0. Modify the
 164 # linker script if JVM prefers a different base location. It can also be
 165 # implemented with 'prelink -r'. But 'prelink' is not (yet) available on
 166 # our build platform (AS-2.1).
 167 LD_SCRIPT = libjvm.so.lds
 168 $(LD_SCRIPT): $(LIBJVM_MAPFILE)
 169         $(QUIETLY) {                                                \
 170           rm -rf $@;                                                \




  23 #
  24 
  25 # Rules to build JVM and related libraries, included from vm.make in the build
  26 # directory.
  27 
  28 # Common build rules.
  29 MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
  30 include $(MAKEFILES_DIR)/rules.make
  31 
  32 default: build
  33 
  34 #----------------------------------------------------------------------
  35 # Defs
  36 
  37 GENERATED     = ../generated
  38 
  39 # read a generated file defining the set of .o's and the .o .h dependencies
  40 include $(GENERATED)/Dependencies
  41 
  42 # read machine-specific adjustments (%%% should do this via buildtree.make?)
  43 ifeq ($(ZERO_BUILD), true)
  44   include $(MAKEFILES_DIR)/zeroshark.make
  45 else
  46   include $(MAKEFILES_DIR)/$(BUILDARCH).make
  47 endif
  48 
  49 # set VPATH so make knows where to look for source files
  50 # Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
  51 # The incls directory contains generated header file lists for inclusion.
  52 # The adfiles directory contains ad_<arch>.[ch]pp.
  53 # The jvmtifiles directory contains jvmti*.[ch]pp
  54 Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls
  55 VPATH    += $(Src_Dirs_V:%=%:)
  56 
  57 # set INCLUDES for C preprocessor
  58 Src_Dirs_I = $(PRECOMPILED_HEADER_DIR) $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)
  59 INCLUDES += $(Src_Dirs_I:%=-I%)
  60 
  61 ifeq (${VERSION}, debug)
  62   SYMFLAG = -g
  63 else
  64   SYMFLAG =
  65 endif
  66 
  67 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined 


 111 include $(MAKEFILES_DIR)/dtrace.make
 112 
 113 #----------------------------------------------------------------------
 114 # JVM
 115 
 116 JVM    = jvm$(G_SUFFIX)
 117 LIBJVM = lib$(JVM).so
 118 
 119 JVM_OBJ_FILES = $(Obj_Files)
 120 
 121 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
 122 
 123 mapfile : $(MAPFILE)
 124         rm -f $@
 125         cat $^ > $@
 126 
 127 mapfile_reorder : mapfile $(REORDERFILE)
 128         rm -f $@
 129         cat $^ > $@
 130 
 131 ifeq ($(ZERO_LIBARCH), ppc64)
 132   STATIC_CXX = false
 133 else
 134   STATIC_CXX = true
 135 endif
 136 
 137 ifeq ($(LINK_INTO),AOUT)
 138   LIBJVM.o                 =
 139   LIBJVM_MAPFILE           =
 140   LIBS_VM                  = $(LIBS)
 141 else
 142   LIBJVM.o                 = $(JVM_OBJ_FILES)
 143   LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
 144   LFLAGS_VM$(LDNOMAP)      += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
 145   LFLAGS_VM                += $(SONAMEFLAG:SONAME=$(LIBJVM))
 146 
 147   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
 148   # get around library dependency and compatibility issues. Must use gcc not
 149   # g++ to link.
 150   ifeq ($(STATIC_CXX), true)
 151     LFLAGS_VM              += $(STATIC_LIBGCC)
 152     LIBS_VM                += $(STATIC_STDCXX)
 153   else
 154     LIBS_VM                += -lstdc++
 155   endif
 156 
 157   LIBS_VM                  += $(LIBS)
 158 endif
 159 ifeq ($(ZERO_BUILD), true)
 160   LIBS_VM += $(LIBFFI_LIBS)
 161 endif
 162 
 163 LINK_VM = $(LINK_LIB.c)
 164 
 165 # rule for building precompiled header
 166 $(PRECOMPILED_HEADER): $(Precompiled_Files)
 167         $(QUIETLY) echo Generating precompiled header $@
 168         $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)/incls
 169         $(QUIETLY) $(COMPILE.CC) -x c++-header -c $(GENERATED)/incls/_precompiled.incl -o $@ $(COMPILE_DONE)
 170 
 171 # making the library:
 172 
 173 ifneq ($(JVM_BASE_ADDR),)
 174 # By default shared library is linked at base address == 0. Modify the
 175 # linker script if JVM prefers a different base location. It can also be
 176 # implemented with 'prelink -r'. But 'prelink' is not (yet) available on
 177 # our build platform (AS-2.1).
 178 LD_SCRIPT = libjvm.so.lds
 179 $(LD_SCRIPT): $(LIBJVM_MAPFILE)
 180         $(QUIETLY) {                                                \
 181           rm -rf $@;                                                \