make/bsd/makefiles/vm.make

Print this page




  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 include $(GAMMADIR)/make/altsrc.make
  32 
  33 default: build
  34 
  35 #----------------------------------------------------------------------
  36 # Defs
  37 
  38 GENERATED     = ../generated
  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 ifeq ($(ZERO_BUILD), true)
  46   include $(MAKEFILES_DIR)/zeroshark.make
  47 else
  48   include $(MAKEFILES_DIR)/$(BUILDARCH).make
  49 endif
  50 
  51 # set VPATH so make knows where to look for source files
  52 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
  53 # The adfiles directory contains ad_<arch>.[ch]pp.
  54 # The jvmtifiles directory contains jvmti*.[ch]pp
  55 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles
  56 VPATH += $(Src_Dirs_V:%=%:)
  57 
  58 # set INCLUDES for C preprocessor.
  59 Src_Dirs_I += $(GENERATED)
  60 # The order is important for the precompiled headers to work.
  61 INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%)
  62 
  63 ifeq (${VERSION}, debug)
  64   SYMFLAG = -g
  65 else


 254 
 255   ifeq ($(OS_VENDOR), Darwin)
 256     LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
 257     LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
 258     LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
 259   endif
 260 
 261   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
 262   # get around library dependency and compatibility issues. Must use gcc not
 263   # g++ to link.
 264   ifeq ($(STATIC_CXX), true)
 265     LFLAGS_VM              += $(STATIC_LIBGCC)
 266     LIBS_VM                += $(STATIC_STDCXX)
 267     LINK_VM                = $(LINK_LIB.CC)
 268   else
 269     LINK_VM                = $(LINK_LIB.CXX)
 270   endif
 271 
 272   LIBS_VM                  += $(LIBS)
 273 endif
 274 ifeq ($(ZERO_BUILD), true)
 275   LIBS_VM += $(LIBFFI_LIBS)
 276 endif
 277 ifeq ($(SHARK_BUILD), true)

 278   LFLAGS_VM += $(LLVM_LDFLAGS)
 279   LIBS_VM   += $(LLVM_LIBS)
 280 endif
 281 
 282 
 283 # rule for building precompiled header
 284 $(PRECOMPILED_HEADER):
 285         $(QUIETLY) echo Generating precompiled header $@
 286         $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
 287         $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
 288 
 289 # making the library:
 290 
 291 ifneq ($(JVM_BASE_ADDR),)
 292 # By default shared library is linked at base address == 0. Modify the
 293 # linker script if JVM prefers a different base location. It can also be
 294 # implemented with 'prelink -r'. But 'prelink' is not (yet) available on
 295 # our build platform (AS-2.1).
 296 LD_SCRIPT = libjvm.so.lds
 297 $(LD_SCRIPT): $(LIBJVM_MAPFILE)
 298         $(QUIETLY) {                                                \
 299           rm -rf $@;                                                \




  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 include $(GAMMADIR)/make/altsrc.make
  32 
  33 default: build
  34 
  35 #----------------------------------------------------------------------
  36 # Defs
  37 
  38 GENERATED     = ../generated
  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 ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
  46   include $(MAKEFILES_DIR)/zeroshark.make
  47 else
  48   include $(MAKEFILES_DIR)/$(BUILDARCH).make
  49 endif
  50 
  51 # set VPATH so make knows where to look for source files
  52 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
  53 # The adfiles directory contains ad_<arch>.[ch]pp.
  54 # The jvmtifiles directory contains jvmti*.[ch]pp
  55 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles
  56 VPATH += $(Src_Dirs_V:%=%:)
  57 
  58 # set INCLUDES for C preprocessor.
  59 Src_Dirs_I += $(GENERATED)
  60 # The order is important for the precompiled headers to work.
  61 INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%)
  62 
  63 ifeq (${VERSION}, debug)
  64   SYMFLAG = -g
  65 else


 254 
 255   ifeq ($(OS_VENDOR), Darwin)
 256     LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
 257     LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
 258     LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
 259   endif
 260 
 261   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
 262   # get around library dependency and compatibility issues. Must use gcc not
 263   # g++ to link.
 264   ifeq ($(STATIC_CXX), true)
 265     LFLAGS_VM              += $(STATIC_LIBGCC)
 266     LIBS_VM                += $(STATIC_STDCXX)
 267     LINK_VM                = $(LINK_LIB.CC)
 268   else
 269     LINK_VM                = $(LINK_LIB.CXX)
 270   endif
 271 
 272   LIBS_VM                  += $(LIBS)
 273 endif
 274 ifeq ($(JVM_VARIANT_ZERO), true)
 275   LIBS_VM += $(LIBFFI_LIBS)
 276 endif
 277 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
 278   LIBS_VM   += $(LIBFFI_LIBS) $(LLVM_LIBS)
 279   LFLAGS_VM += $(LLVM_LDFLAGS)

 280 endif
 281 
 282 
 283 # rule for building precompiled header
 284 $(PRECOMPILED_HEADER):
 285         $(QUIETLY) echo Generating precompiled header $@
 286         $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
 287         $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
 288 
 289 # making the library:
 290 
 291 ifneq ($(JVM_BASE_ADDR),)
 292 # By default shared library is linked at base address == 0. Modify the
 293 # linker script if JVM prefers a different base location. It can also be
 294 # implemented with 'prelink -r'. But 'prelink' is not (yet) available on
 295 # our build platform (AS-2.1).
 296 LD_SCRIPT = libjvm.so.lds
 297 $(LD_SCRIPT): $(LIBJVM_MAPFILE)
 298         $(QUIETLY) {                                                \
 299           rm -rf $@;                                                \