jdk/make/java/redist/sajdi/Makefile
author dcubed
Tue, 20 Sep 2011 19:16:21 -0700
changeset 10603 c315c8424ce2
parent 9035 1255eb81cc2f
child 12047 320a714614e9
permissions -rw-r--r--
7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link Summary: Add support for importing .debuginfo files from HSX. Reviewed-by: phh
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
     1
#
9035
1255eb81cc2f 7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents: 8583
diff changeset
     2
# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
     4
#
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    10
#
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    15
# accompanied this code).
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    16
#
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    23
# questions.
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    24
#
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    25
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    26
BUILDDIR = ../../..
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    27
PRODUCT  = java
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    28
include $(BUILDDIR)/common/Defs.gmk
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    29
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    30
ifeq ($(PLATFORM), windows)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    31
  LIB_LOCATION = $(BINDIR)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    32
else
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    33
  LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    34
endif
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    35
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    36
# INCLUDE_SA is false on platforms where SA is not supported.
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    37
# On platforms where it is supported, we want to allow it to
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    38
# not be present, at least temporarily.  So,
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    39
# if the SA files (well, just sa-jdi.jar) do not exist
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    40
# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    41
SA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    42
                          $(ECHO) true; \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    43
                        else \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    44
                          $(ECHO) false; \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    45
                        fi)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    46
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    47
ifeq ($(SA_EXISTS), false)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    48
  INCLUDE_SA := false
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    49
endif
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    50
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    51
IMPORT_LIST =
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    52
ifeq ($(INCLUDE_SA), true)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    53
  IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    54
                 $(LIB_LOCATION)/$(SALIB_NAME)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    55
  ifeq ($(PLATFORM), windows)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    56
    IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    57
                   $(LIB_LOCATION)/$(SAPDB_NAME)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    58
  endif
10603
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    59
  ifneq ($(OBJCOPY),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    60
    # the import JDK may not contain .debuginfo files
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    61
    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    62
      IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    63
    endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    64
  endif
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    65
endif # INCLUDE_SA
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    66
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    67
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    68
ifeq ($(INCLUDE_SA), true)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    69
# The Serviceability Agent is built in the Hotspot workspace.
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    70
# It contains two files:
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    71
#  - sa-jdi.jar:  This goes into the same dir as tools.jar.
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    72
#  - a shared library:  sawindbg.dll on windows / libproc.sa on unix
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    73
#		        This goes into the same dir as the other
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    74
#			shared libs, eg. libjdwp.so.
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    75
$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    76
	$(install-importonly-file)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    77
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    78
$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    79
	$(install-import-file)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    80
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    81
ifeq ($(PLATFORM), windows)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    82
$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    83
	$(install-import-file)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    84
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    85
$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    86
	$(install-import-file)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    87
endif # windows
10603
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    88
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    89
  ifneq ($(OBJCOPY),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    90
$(LIB_LOCATION)/$(SA_DEBUGINFO_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DEBUGINFO_NAME)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    91
	$(install-import-file)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9035
diff changeset
    92
  endif
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    93
endif # INCLUDE_SA
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    94
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    95
all: $(IMPORT_LIST)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    96
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff changeset
    97
clean clobber::