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