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