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