Makefile revision 5371
176N/A#
176N/A# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
176N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
176N/A#
176N/A# This code is free software; you can redistribute it and/or modify it
176N/A# under the terms of the GNU General Public License version 2 only, as
176N/A# published by the Free Software Foundation. Oracle designates this
176N/A# particular file as subject to the "Classpath" exception as provided
176N/A# by Oracle in the LICENSE file that accompanied this code.
176N/A#
176N/A# This code is distributed in the hope that it will be useful, but WITHOUT
176N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
176N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
176N/A# version 2 for more details (a copy is included in the LICENSE file that
176N/A# accompanied this code).
176N/A#
176N/A# You should have received a copy of the GNU General Public License version
176N/A# 2 along with this work; if not, write to the Free Software Foundation,
176N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
176N/A#
3817N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
176N/A# or visit www.oracle.com if you need additional information or have any
176N/A# questions.
176N/A#
176N/A
2134N/ABUILDDIR = ../../..
618N/APRODUCT = java
176N/Ainclude $(BUILDDIR)/common/Defs.gmk
2134N/A
844N/Aifeq ($(PLATFORM), windows)
2134N/A LIB_LOCATION = $(BINDIR)
176N/Aelse ifeq ($(PLATFORM), macosx)
1258N/A LIB_LOCATION = $(LIBDIR)
176N/Aelse
2899N/A LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
2899N/Aendif
3817N/A
3817N/A# INCLUDE_SA is false on platforms where SA is not supported.
3817N/A# On platforms where it is supported, we want to allow it to
176N/A# not be present, at least temporarily. So,
176N/A# if the SA files (well, just sa-jdi.jar) do not exist
176N/A# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
176N/ASA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
176N/A $(ECHO) true; \
176N/A else \
176N/A $(ECHO) false; \
176N/A fi)
176N/A
176N/Aifeq ($(SA_EXISTS), false)
176N/A INCLUDE_SA := false
176N/Aendif
176N/A
176N/AIMPORT_LIST =
176N/Aifeq ($(INCLUDE_SA), true)
176N/A IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
176N/A $(LIB_LOCATION)/$(SALIB_NAME)
176N/A ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
176N/A ifeq ($(ZIP_DEBUGINFO_FILES),1)
176N/A # the import JDK may not contain .diz files
176N/A ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DIZ_NAME)),)
176N/A IMPORT_LIST += $(LIB_LOCATION)/$(SA_DIZ_NAME)
176N/A endif
176N/A else
176N/A ifeq ($(PLATFORM), windows)
176N/A # the import JDK may not contain .pdb files
176N/A ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SAPDB_NAME)),)
703N/A # assume .map file is present if .pdb is present
703N/A IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
703N/A $(LIB_LOCATION)/$(SAPDB_NAME)
703N/A endif
176N/A else
519N/A # the import JDK may not contain .debuginfo files
2134N/A ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),)
176N/A IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME)
176N/A endif
176N/A endif
176N/A endif
176N/A endif
2134N/Aendif # INCLUDE_SA
2134N/A
2134N/A
2134N/Aifeq ($(INCLUDE_SA), true)
1639N/A# The Serviceability Agent is built in the Hotspot workspace.
1392N/A# It contains two files:
176N/A# - sa-jdi.jar: This goes into the same dir as tools.jar.
2134N/A# - a shared library: sawindbg.dll on windows / libproc.sa on unix
176N/A# This goes into the same dir as the other
176N/A# shared libs, eg. libjdwp.so.
176N/A$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
176N/A $(install-importonly-file)
176N/A
176N/A$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
176N/A $(install-import-file)
176N/A
176N/A ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
176N/A ifeq ($(ZIP_DEBUGINFO_FILES),1)
176N/A$(LIB_LOCATION)/$(SA_DIZ_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DIZ_NAME)
176N/A $(install-import-file)
176N/A else
176N/A ifeq ($(PLATFORM), windows)
176N/A$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
176N/A $(install-import-file)
176N/A
176N/A$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
176N/A $(install-import-file)
2134N/A else
2134N/A$(LIB_LOCATION)/$(SA_DEBUGINFO_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DEBUGINFO_NAME)
414N/A $(install-import-file)
176N/A endif
176N/A endif
414N/A endif
414N/Aendif # INCLUDE_SA
414N/A
414N/Aall: $(IMPORT_LIST)
414N/A
176N/Aclean clobber::
176N/A