make/linux/makefiles/vm.make

Tue, 24 Feb 2015 15:04:52 -0500

author
dlong
date
Tue, 24 Feb 2015 15:04:52 -0500
changeset 7598
ddce0b7cee93
parent 7573
7b93939e093e
child 7994
04ff2f6cd0eb
child 9330
f175513c2c3a
permissions
-rw-r--r--

8072383: resolve conflicts between open and closed ports
Summary: refactor close to remove references to closed ports
Reviewed-by: kvn, simonis, sgehwolf, dholmes

duke@435 1 #
dlong@7598 2 # Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
duke@435 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 #
duke@435 5 # This code is free software; you can redistribute it and/or modify it
duke@435 6 # under the terms of the GNU General Public License version 2 only, as
duke@435 7 # published by the Free Software Foundation.
duke@435 8 #
duke@435 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 # accompanied this code).
duke@435 14 #
duke@435 15 # You should have received a copy of the GNU General Public License version
duke@435 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 #
trims@1907 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 # or visit www.oracle.com if you need additional information or have any
trims@1907 21 # questions.
sla@5237 22 #
duke@435 23 #
duke@435 24
duke@435 25 # Rules to build JVM and related libraries, included from vm.make in the build
duke@435 26 # directory.
duke@435 27
duke@435 28 # Common build rules.
kamg@526 29 MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
duke@435 30 include $(MAKEFILES_DIR)/rules.make
kamg@2515 31 include $(GAMMADIR)/make/altsrc.make
duke@435 32
duke@435 33 default: build
duke@435 34
duke@435 35 #----------------------------------------------------------------------
duke@435 36 # Defs
duke@435 37
duke@435 38 GENERATED = ../generated
stefank@2314 39 DEP_DIR = $(GENERATED)/dependencies
duke@435 40
stefank@2314 41 # reads the generated files defining the set of .o's and the .o .h dependencies
stefank@2314 42 -include $(DEP_DIR)/*.d
duke@435 43
duke@435 44 # read machine-specific adjustments (%%% should do this via buildtree.make?)
erikj@3649 45 ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
never@1445 46 include $(MAKEFILES_DIR)/zeroshark.make
never@1445 47 else
dlong@7598 48 BUILDARCH_MAKE = $(MAKEFILES_DIR)/$(BUILDARCH).make
dlong@7598 49 ALT_BUILDARCH_MAKE = $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/$(BUILDARCH).make
dlong@7598 50 include $(if $(wildcard $(ALT_BUILDARCH_MAKE)),$(ALT_BUILDARCH_MAKE),$(BUILDARCH_MAKE))
never@1445 51 endif
duke@435 52
duke@435 53 # set VPATH so make knows where to look for source files
stefank@2314 54 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
duke@435 55 # The adfiles directory contains ad_<arch>.[ch]pp.
duke@435 56 # The jvmtifiles directory contains jvmti*.[ch]pp
sla@5237 57 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
stefank@2314 58 VPATH += $(Src_Dirs_V:%=%:)
duke@435 59
stefank@2314 60 # set INCLUDES for C preprocessor.
stefank@2314 61 Src_Dirs_I += $(GENERATED)
stefank@2314 62 # The order is important for the precompiled headers to work.
stefank@2314 63 INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%)
duke@435 64
dcubed@3150 65 # SYMFLAG is used by {jsig,saproc}.make
dcubed@3724 66 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3150 67 # always build with debug info when we can create .debuginfo files
duke@435 68 SYMFLAG = -g
duke@435 69 else
dcubed@3150 70 ifeq (${VERSION}, debug)
dcubed@3150 71 SYMFLAG = -g
dcubed@3150 72 else
dcubed@3150 73 SYMFLAG =
dcubed@3150 74 endif
duke@435 75 endif
duke@435 76
sla@5237 77 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
duke@435 78 # in $(GAMMADIR)/make/defs.make
duke@435 79 ifeq ($(HOTSPOT_BUILD_VERSION),)
duke@435 80 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\""
duke@435 81 else
duke@435 82 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\""
duke@435 83 endif
duke@435 84
duke@435 85 # The following variables are defined in the generated flags.make file.
duke@435 86 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
duke@435 87 JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
jrose@535 88 HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
duke@435 89 BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
duke@435 90 BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
duke@435 91 VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
duke@435 92
erikj@3518 93 CXXFLAGS = \
duke@435 94 ${SYSDEFS} \
duke@435 95 ${INCLUDES} \
duke@435 96 ${BUILD_VERSION} \
duke@435 97 ${BUILD_TARGET} \
duke@435 98 ${BUILD_USER} \
jrose@535 99 ${HS_LIB_ARCH} \
duke@435 100 ${VM_DISTRO}
duke@435 101
ohrstrom@3517 102 # This is VERY important! The version define must only be supplied to vm_version.o
ohrstrom@3517 103 # If not, ccache will not re-use the cache at all, since the version string might contain
sla@5237 104 # a time and date.
mikael@4602 105 CXXFLAGS/vm_version.o += ${JRE_VERSION}
mikael@4602 106
mikael@4602 107 CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
mikael@4602 108
mikael@4602 109 # File specific flags
mikael@4602 110 CXXFLAGS += $(CXXFLAGS/BYFILE)
mikael@4602 111
tamao@5309 112 # Large File Support
tamao@5309 113 ifneq ($(LP64), 1)
tamao@5309 114 CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
tamao@5309 115 endif # ifneq ($(LP64), 1)
ohrstrom@3517 116
duke@435 117 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
duke@435 118 CFLAGS += $(CFLAGS_WARN/BYFILE)
duke@435 119
duke@435 120 # Do not use C++ exception handling
duke@435 121 CFLAGS += $(CFLAGS/NOEX)
duke@435 122
duke@435 123 # Extra flags from gnumake's invocation or environment
duke@435 124 CFLAGS += $(EXTRA_CFLAGS)
bobv@2036 125 LFLAGS += $(EXTRA_CFLAGS)
duke@435 126
dsamersoff@2837 127 # Don't set excutable bit on stack segment
dsamersoff@2837 128 # the same could be done by separate execstack command
dsamersoff@2837 129 LFLAGS += -Xlinker -z -Xlinker noexecstack
dsamersoff@2837 130
duke@435 131 LIBS += -lm -ldl -lpthread
duke@435 132
duke@435 133 # By default, link the *.o into the library, not the executable.
duke@435 134 LINK_INTO$(LINK_INTO) = LIBJVM
duke@435 135
duke@435 136 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
duke@435 137
duke@435 138 #----------------------------------------------------------------------
duke@435 139 # jvm_db & dtrace
duke@435 140 include $(MAKEFILES_DIR)/dtrace.make
duke@435 141
duke@435 142 #----------------------------------------------------------------------
duke@435 143 # JVM
duke@435 144
phh@1558 145 JVM = jvm
phh@1558 146 LIBJVM = lib$(JVM).so
duke@435 147
dcubed@3150 148 LIBJVM_DEBUGINFO = lib$(JVM).debuginfo
dcubed@3724 149 LIBJVM_DIZ = lib$(JVM).diz
dcubed@3150 150
kamg@2515 151 SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
stefank@2314 152
kamg@2515 153 SOURCE_PATHS=\
kamg@2515 154 $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
kamg@2515 155 \( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
kamg@2515 156 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
kamg@2515 157 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
kamg@2515 158 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
kamg@2515 159 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
stefank@2314 160
sla@5237 161 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
sla@5237 162 CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
sla@5237 163
sla@5237 164 ifneq ($(INCLUDE_TRACE), false)
sla@5237 165 CORE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
phh@3427 166 find $(HS_ALT_SRC)/share/vm/jfr -type d; \
phh@3427 167 fi)
phh@3427 168 endif
kamg@2515 169
kamg@2515 170 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
kamg@2515 171 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
kamg@2515 172
kamg@2515 173 COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
kamg@2515 174 COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt)
kamg@2515 175 COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/opto
kamg@2515 176 COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt
kamg@2515 177 COMPILER2_PATHS += $(GENERATED)/adfiles
stefank@2314 178
dholmes@2752 179 SHARK_PATHS := $(GAMMADIR)/src/share/vm/shark
dholmes@2752 180
stefank@2314 181 # Include dirs per type.
stefank@2314 182 Src_Dirs/CORE := $(CORE_PATHS)
stefank@2314 183 Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS)
stefank@2314 184 Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS)
stefank@2314 185 Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS)
stefank@2314 186 Src_Dirs/ZERO := $(CORE_PATHS)
dholmes@2752 187 Src_Dirs/SHARK := $(CORE_PATHS) $(SHARK_PATHS)
stefank@2314 188 Src_Dirs := $(Src_Dirs/$(TYPE))
stefank@2314 189
neliasso@4949 190 COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp c2_\* runtime_\*
stefank@2314 191 COMPILER1_SPECIFIC_FILES := c1_\*
stefank@2314 192 SHARK_SPECIFIC_FILES := shark
stefank@2314 193 ZERO_SPECIFIC_FILES := zero
stefank@2314 194
stefank@2314 195 # Always exclude these.
jprovino@4165 196 Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
stefank@2314 197
stefank@2314 198 # Exclude per type.
stefank@2314 199 Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
stefank@2314 200 Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
stefank@2314 201 Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
stefank@2314 202 Src_Files_EXCLUDE/TIERED := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
stefank@2314 203 Src_Files_EXCLUDE/ZERO := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
stefank@2314 204 Src_Files_EXCLUDE/SHARK := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES)
stefank@2314 205
stefank@2314 206 Src_Files_EXCLUDE += $(Src_Files_EXCLUDE/$(TYPE))
stefank@2314 207
stefank@2314 208 # Special handling of arch model.
stefank@2314 209 ifeq ($(Platform_arch_model), x86_32)
stefank@2314 210 Src_Files_EXCLUDE += \*x86_64\*
stefank@2314 211 endif
stefank@2314 212 ifeq ($(Platform_arch_model), x86_64)
stefank@2314 213 Src_Files_EXCLUDE += \*x86_32\*
stefank@2314 214 endif
stefank@2314 215
dholmes@5442 216 # Alternate vm.make
dholmes@5442 217 # This has to be included here to allow changes to the source
dholmes@5442 218 # directories and excluded files before they are expanded
dholmes@5442 219 # by the definition of Src_Files.
dholmes@5442 220 -include $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make
dholmes@5442 221
stefank@2314 222 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
stefank@2314 223 define findsrc
stefank@2368 224 $(notdir $(shell find $(1)/. ! -name . -prune \
stefank@2368 225 -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
stefank@2368 226 -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \)))
stefank@2314 227 endef
stefank@2314 228
stefank@2314 229 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
stefank@2314 230
stefank@2326 231 Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
stefank@2314 232
duke@435 233 JVM_OBJ_FILES = $(Obj_Files)
duke@435 234
duke@435 235 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
duke@435 236
jwilhelm@7059 237 mapfile : $(MAPFILE) vm.def mapfile_ext
duke@435 238 rm -f $@
never@1729 239 awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") \
jwilhelm@7059 240 { system ("cat mapfile_ext"); system ("cat vm.def"); } \
never@1729 241 else \
never@1729 242 { print $$0 } \
never@1729 243 }' > $@ < $(MAPFILE)
duke@435 244
duke@435 245 mapfile_reorder : mapfile $(REORDERFILE)
duke@435 246 rm -f $@
duke@435 247 cat $^ > $@
duke@435 248
dlong@7573 249 VMDEF_PAT = ^_ZTV
dlong@7573 250 VMDEF_PAT := ^gHotSpotVM|$(VMDEF_PAT)
dlong@7573 251 VMDEF_PAT := ^UseSharedSpaces$$|$(VMDEF_PAT)
dlong@7573 252 VMDEF_PAT := ^_ZN9Arguments17SharedArchivePathE$$|$(VMDEF_PAT)
dlong@7573 253
never@1729 254 vm.def: $(Res_Files) $(Obj_Files)
dlong@7573 255 $(QUIETLY) $(NM) --defined-only $(Obj_Files) | sort -k3 -u | \
dlong@7573 256 awk '$$3 ~ /$(VMDEF_PAT)/ { print "\t" $$3 ";" }' > $@
never@1729 257
jwilhelm@7059 258 mapfile_ext:
jwilhelm@7059 259 rm -f $@
jwilhelm@7059 260 touch $@
jwilhelm@7059 261 if [ -f $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext ]; then \
jwilhelm@7059 262 cat $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext > $@; \
jwilhelm@7059 263 fi
jwilhelm@7059 264
erikj@3649 265 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
never@1445 266 STATIC_CXX = false
never@1445 267 else
twisti@2047 268 ifeq ($(ZERO_LIBARCH), ppc64)
twisti@2047 269 STATIC_CXX = false
twisti@2047 270 else
twisti@2047 271 STATIC_CXX = true
twisti@2047 272 endif
never@1445 273 endif
duke@435 274
duke@435 275 ifeq ($(LINK_INTO),AOUT)
duke@435 276 LIBJVM.o =
duke@435 277 LIBJVM_MAPFILE =
duke@435 278 LIBS_VM = $(LIBS)
duke@435 279 else
duke@435 280 LIBJVM.o = $(JVM_OBJ_FILES)
duke@435 281 LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
duke@435 282 LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
duke@435 283 LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
duke@435 284
duke@435 285 # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
duke@435 286 # get around library dependency and compatibility issues. Must use gcc not
duke@435 287 # g++ to link.
duke@435 288 ifeq ($(STATIC_CXX), true)
duke@435 289 LFLAGS_VM += $(STATIC_LIBGCC)
duke@435 290 LIBS_VM += $(STATIC_STDCXX)
duke@435 291 else
duke@435 292 LIBS_VM += -lstdc++
duke@435 293 endif
duke@435 294
duke@435 295 LIBS_VM += $(LIBS)
duke@435 296 endif
erikj@3649 297 ifeq ($(JVM_VARIANT_ZERO), true)
never@1445 298 LIBS_VM += $(LIBFFI_LIBS)
never@1445 299 endif
erikj@3649 300 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
erikj@3649 301 LIBS_VM += $(LIBFFI_LIBS) $(LLVM_LIBS)
twisti@2047 302 LFLAGS_VM += $(LLVM_LDFLAGS)
twisti@2047 303 endif
duke@435 304
erikj@3518 305 LINK_VM = $(LINK_LIB.CC)
duke@435 306
duke@435 307 # rule for building precompiled header
stefank@2314 308 $(PRECOMPILED_HEADER):
duke@435 309 $(QUIETLY) echo Generating precompiled header $@
stefank@2314 310 $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
erikj@3518 311 $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
duke@435 312
duke@435 313 # making the library:
duke@435 314
duke@435 315 ifneq ($(JVM_BASE_ADDR),)
duke@435 316 # By default shared library is linked at base address == 0. Modify the
duke@435 317 # linker script if JVM prefers a different base location. It can also be
duke@435 318 # implemented with 'prelink -r'. But 'prelink' is not (yet) available on
duke@435 319 # our build platform (AS-2.1).
duke@435 320 LD_SCRIPT = libjvm.so.lds
duke@435 321 $(LD_SCRIPT): $(LIBJVM_MAPFILE)
duke@435 322 $(QUIETLY) { \
duke@435 323 rm -rf $@; \
duke@435 324 $(LINK_VM) -Wl,--verbose $(LFLAGS_VM) 2>&1 | \
duke@435 325 sed -e '/^======/,/^======/!d' \
duke@435 326 -e '/^======/d' \
duke@435 327 -e 's/0\( + SIZEOF_HEADERS\)/$(JVM_BASE_ADDR)\1/' \
duke@435 328 > $@; \
duke@435 329 }
duke@435 330 LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
duke@435 331 endif
duke@435 332
duke@435 333 # With more recent Redhat releases (or the cutting edge version Fedora), if
duke@435 334 # SELinux is configured to be enabled, the runtime linker will fail to apply
duke@435 335 # the text relocation to libjvm.so considering that it is built as a non-PIC
sla@5237 336 # DSO. To workaround that, we run chcon to libjvm.so after it is built. See
duke@435 337 # details in bug 6538311.
duke@435 338 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
duke@435 339 $(QUIETLY) { \
duke@435 340 echo Linking vm...; \
erikj@3518 341 $(LINK_LIB.CXX/PRE_HOOK) \
duke@435 342 $(LINK_VM) $(LD_SCRIPT_FLAG) \
ohair@4087 343 $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \
erikj@3518 344 $(LINK_LIB.CXX/POST_HOOK) \
duke@435 345 rm -f $@.1; ln -s $@ $@.1; \
bobv@2036 346 if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then \
bobv@2036 347 if [ -x /usr/sbin/selinuxenabled ] ; then \
bobv@2036 348 /usr/sbin/selinuxenabled; \
bobv@2036 349 if [ $$? = 0 ] ; then \
bobv@2036 350 /usr/bin/chcon -t textrel_shlib_t $@; \
bobv@2036 351 if [ $$? != 0 ]; then \
bobv@2036 352 echo "ERROR: Cannot chcon $@"; \
bobv@2036 353 fi \
bobv@2036 354 fi \
bobv@2036 355 fi \
bobv@2036 356 fi \
duke@435 357 }
dholmes@4243 358
dholmes@4243 359 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3150 360 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
dcubed@3150 361 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
dholmes@4243 362 ifeq ($(STRIP_POLICY),all_strip)
dcubed@3150 363 $(QUIETLY) $(STRIP) $@
dholmes@4243 364 else
dholmes@4243 365 ifeq ($(STRIP_POLICY),min_strip)
dcubed@3150 366 $(QUIETLY) $(STRIP) -g $@
dholmes@4243 367 # implied else here is no stripping at all
dcubed@3150 368 endif
dholmes@4243 369 endif
dholmes@4243 370 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@4344 371 $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
dcubed@4344 372 $(RM) $(LIBJVM_DEBUGINFO)
dcubed@3150 373 endif
dcubed@3150 374 endif
duke@435 375
dcubed@3150 376 DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR)
dcubed@3150 377 DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM)
dcubed@3150 378 DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)
dcubed@3724 379 DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
duke@435 380
duke@435 381 install_jvm: $(LIBJVM)
duke@435 382 @echo "Copying $(LIBJVM) to $(DEST_JVM)"
dcubed@3150 383 $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
dcubed@3150 384 cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
dcubed@3724 385 $(QUIETLY) test -f $(LIBJVM_DIZ) && \
dcubed@3724 386 cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
duke@435 387 $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
duke@435 388
duke@435 389 #----------------------------------------------------------------------
duke@435 390 # Other files
duke@435 391
duke@435 392 # Signal interposition library
duke@435 393 include $(MAKEFILES_DIR)/jsig.make
duke@435 394
duke@435 395 # Serviceability agent
duke@435 396 include $(MAKEFILES_DIR)/saproc.make
duke@435 397
duke@435 398 #----------------------------------------------------------------------
duke@435 399
mgerdin@4637 400 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) dtraceCheck
duke@435 401
duke@435 402 install: install_jvm install_jsig install_saproc
duke@435 403
dholmes@5442 404 .PHONY: default build install install_jvm $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/$(BUILDARCH).make $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make

mercurial