make/solaris/makefiles/vm.make

Print this page




  39 DEP_DIR       = $(GENERATED)/dependencies
  40 
  41 # reads the generated files defining the set of .o's and the .o .h dependencies
  42 -include $(DEP_DIR)/*.d
  43 
  44 # read machine-specific adjustments (%%% should do this via buildtree.make?)
  45 include $(MAKEFILES_DIR)/$(BUILDARCH).make
  46 
  47 # set VPATH so make knows where to look for source files
  48 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
  49 # The adfiles directory contains ad_<arch>.[ch]pp.
  50 # The jvmtifiles directory contains jvmti*.[ch]pp
  51 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles
  52 VPATH += $(Src_Dirs_V:%=%:)
  53 
  54 # set INCLUDES for C preprocessor
  55 Src_Dirs_I += $(GENERATED)
  56 INCLUDES += $(Src_Dirs_I:%=-I%)
  57 
  58 # SYMFLAG is used by {dtrace,jsig,saproc}.make.
  59 ifneq ($(OBJCOPY),)
  60   # always build with debug info when we can create .debuginfo files
  61   # and disable 'lazy debug info' so the .so has everything.
  62   SYMFLAG = -g -xs
  63 else
  64   ifeq (${VERSION}, debug)
  65     SYMFLAG = -g
  66   else
  67     SYMFLAG =
  68   endif
  69 endif
  70 
  71 # The following variables are defined in the generated flags.make file.
  72 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
  73 JRE_VERSION   = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
  74 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
  75 BUILD_TARGET  = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
  76 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
  77 VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
  78 
  79 CXXFLAGS =           \


 135 LIBS += -lkstat
 136 endif
 137 
 138 # By default, link the *.o into the library, not the executable.
 139 LINK_INTO$(LINK_INTO) = LIBJVM
 140 
 141 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
 142 
 143 #----------------------------------------------------------------------
 144 # jvm_db & dtrace
 145 include $(MAKEFILES_DIR)/dtrace.make
 146 
 147 #----------------------------------------------------------------------
 148 # JVM
 149 
 150 JVM      = jvm
 151 LIBJVM   = lib$(JVM).so
 152 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
 153 
 154 LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo

 155 LIBJVM_G_DEBUGINFO = lib$(JVM)$(G_SUFFIX).debuginfo

 156 
 157 SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt
 158 
 159 SOURCE_PATHS=\
 160   $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
 161       \( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
 162 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
 163 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
 164 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
 165 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
 166 
 167 SOURCE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
 168   find $(HS_ALT_SRC)/share/vm/jfr -type d; \
 169   fi)
 170 
 171 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
 172 CORE_PATHS+=$(GENERATED)/jvmtifiles
 173 
 174 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
 175 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1


 266   LFLAGS_VM                += $(STATIC_LIBGCC)
 267   LIBS_VM                  += $(STATIC_STDCXX) $(LIBS)
 268 endif
 269 endif
 270 
 271 ifdef USE_GCC
 272 LINK_VM = $(LINK_LIB.CC)
 273 else
 274 LINK_VM = $(LINK_LIB.CXX)
 275 endif
 276 # making the library:
 277 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) 
 278 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
 279         @echo Linking vm...
 280         $(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
 281         $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM)
 282         $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)
 283         $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1
 284         $(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G)
 285         $(QUIETLY) [ -f $(LIBJVM_G).1 ] || ln -s $@.1 $(LIBJVM_G).1
 286 ifneq ($(OBJCOPY),)
 287         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
 288         $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
 289   ifeq ($(STRIP_POLICY),all_strip)
 290         $(QUIETLY) $(STRIP) $@
 291   else
 292     ifeq ($(STRIP_POLICY),min_strip)
 293         $(QUIETLY) $(STRIP) -x $@
 294     # implied else here is no stripping at all
 295     endif
 296   endif
 297         $(QUIETLY) [ -f $(LIBJVM_G_DEBUGINFO) ] || ln -s $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)





 298 endif
 299 endif # filter -sbfast -xsbfast
 300 
 301 
 302 DEST_SUBDIR        = $(JDK_LIBDIR)/$(VM_SUBDIR)
 303 DEST_JVM           = $(DEST_SUBDIR)/$(LIBJVM)
 304 DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)

 305 
 306 install_jvm: $(LIBJVM)
 307         @echo "Copying $(LIBJVM) to $(DEST_JVM)"
 308         $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
 309             cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)


 310         $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
 311 
 312 #----------------------------------------------------------------------
 313 # Other files
 314 
 315 # Gamma launcher
 316 include $(MAKEFILES_DIR)/launcher.make
 317 
 318 # Signal interposition library
 319 include $(MAKEFILES_DIR)/jsig.make
 320 
 321 # Serviceability agent
 322 include $(MAKEFILES_DIR)/saproc.make
 323 
 324 # Whitebox testing API
 325 include $(MAKEFILES_DIR)/wb.make
 326 
 327 #----------------------------------------------------------------------
 328 
 329 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(LIBJVM_DTRACE) $(BUILDLIBSAPROC) dtraceCheck $(WB_JAR)


  39 DEP_DIR       = $(GENERATED)/dependencies
  40 
  41 # reads the generated files defining the set of .o's and the .o .h dependencies
  42 -include $(DEP_DIR)/*.d
  43 
  44 # read machine-specific adjustments (%%% should do this via buildtree.make?)
  45 include $(MAKEFILES_DIR)/$(BUILDARCH).make
  46 
  47 # set VPATH so make knows where to look for source files
  48 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
  49 # The adfiles directory contains ad_<arch>.[ch]pp.
  50 # The jvmtifiles directory contains jvmti*.[ch]pp
  51 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles
  52 VPATH += $(Src_Dirs_V:%=%:)
  53 
  54 # set INCLUDES for C preprocessor
  55 Src_Dirs_I += $(GENERATED)
  56 INCLUDES += $(Src_Dirs_I:%=-I%)
  57 
  58 # SYMFLAG is used by {dtrace,jsig,saproc}.make.
  59 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
  60   # always build with debug info when we can create .debuginfo files
  61   # and disable 'lazy debug info' so the .so has everything.
  62   SYMFLAG = -g -xs
  63 else
  64   ifeq (${VERSION}, debug)
  65     SYMFLAG = -g
  66   else
  67     SYMFLAG =
  68   endif
  69 endif
  70 
  71 # The following variables are defined in the generated flags.make file.
  72 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
  73 JRE_VERSION   = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
  74 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
  75 BUILD_TARGET  = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
  76 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
  77 VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
  78 
  79 CXXFLAGS =           \


 135 LIBS += -lkstat
 136 endif
 137 
 138 # By default, link the *.o into the library, not the executable.
 139 LINK_INTO$(LINK_INTO) = LIBJVM
 140 
 141 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
 142 
 143 #----------------------------------------------------------------------
 144 # jvm_db & dtrace
 145 include $(MAKEFILES_DIR)/dtrace.make
 146 
 147 #----------------------------------------------------------------------
 148 # JVM
 149 
 150 JVM      = jvm
 151 LIBJVM   = lib$(JVM).so
 152 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
 153 
 154 LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo
 155 LIBJVM_DIZ         = lib$(JVM).diz
 156 LIBJVM_G_DEBUGINFO = lib$(JVM)$(G_SUFFIX).debuginfo
 157 LIBJVM_G_DIZ       = lib$(JVM)$(G_SUFFIX).diz
 158 
 159 SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt
 160 
 161 SOURCE_PATHS=\
 162   $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
 163       \( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
 164 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
 165 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
 166 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
 167 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
 168 
 169 SOURCE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
 170   find $(HS_ALT_SRC)/share/vm/jfr -type d; \
 171   fi)
 172 
 173 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
 174 CORE_PATHS+=$(GENERATED)/jvmtifiles
 175 
 176 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
 177 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1


 268   LFLAGS_VM                += $(STATIC_LIBGCC)
 269   LIBS_VM                  += $(STATIC_STDCXX) $(LIBS)
 270 endif
 271 endif
 272 
 273 ifdef USE_GCC
 274 LINK_VM = $(LINK_LIB.CC)
 275 else
 276 LINK_VM = $(LINK_LIB.CXX)
 277 endif
 278 # making the library:
 279 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) 
 280 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
 281         @echo Linking vm...
 282         $(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
 283         $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM)
 284         $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)
 285         $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1
 286         $(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G)
 287         $(QUIETLY) [ -f $(LIBJVM_G).1 ] || ln -s $@.1 $(LIBJVM_G).1
 288 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 289         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
 290         $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
 291   ifeq ($(STRIP_POLICY),all_strip)
 292         $(QUIETLY) $(STRIP) $@
 293   else
 294     ifeq ($(STRIP_POLICY),min_strip)
 295         $(QUIETLY) $(STRIP) -x $@
 296     # implied else here is no stripping at all
 297     endif
 298   endif
 299         $(QUIETLY) [ -f $(LIBJVM_G_DEBUGINFO) ] || ln -s $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
 300   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 301         $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
 302         $(RM) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
 303         [ -f $(LIBJVM_G_DIZ) ] || { ln -s $(LIBJVM_DIZ) $(LIBJVM_G_DIZ); }
 304   endif
 305 endif
 306 endif # filter -sbfast -xsbfast
 307 
 308 
 309 DEST_SUBDIR        = $(JDK_LIBDIR)/$(VM_SUBDIR)
 310 DEST_JVM           = $(DEST_SUBDIR)/$(LIBJVM)
 311 DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)
 312 DEST_JVM_DIZ       = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
 313 
 314 install_jvm: $(LIBJVM)
 315         @echo "Copying $(LIBJVM) to $(DEST_JVM)"
 316         $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
 317             cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
 318         $(QUIETLY) test -f $(LIBJVM_DIZ) && \
 319             cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
 320         $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
 321 
 322 #----------------------------------------------------------------------
 323 # Other files
 324 
 325 # Gamma launcher
 326 include $(MAKEFILES_DIR)/launcher.make
 327 
 328 # Signal interposition library
 329 include $(MAKEFILES_DIR)/jsig.make
 330 
 331 # Serviceability agent
 332 include $(MAKEFILES_DIR)/saproc.make
 333 
 334 # Whitebox testing API
 335 include $(MAKEFILES_DIR)/wb.make
 336 
 337 #----------------------------------------------------------------------
 338 
 339 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(LIBJVM_DTRACE) $(BUILDLIBSAPROC) dtraceCheck $(WB_JAR)