hotspot/make/Dist.gmk
author ccheung
Tue, 07 Jun 2016 00:06:17 +0000
changeset 39211 8e8b396a42e9
parent 38097 1ca3d6f508b1
child 40381 1f2c47214988
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     1
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     2
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     4
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    10
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    15
# accompanied this code).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    16
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    20
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    23
# questions.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    24
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    25
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    26
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    27
# Copy the generated output into well-defined places in the dist directory.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    28
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    29
# This must be the first rule
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    30
default: all
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    31
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    32
include $(SPEC)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    33
include MakeBase.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    34
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    35
$(eval $(call IncludeCustomExtension, hotspot, Dist.gmk))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    36
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    37
DIST_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/dist
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    38
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    39
# Unfortunately, all platforms have different target subdirs.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    40
ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    41
  LIB_SUBDIR := bin
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    42
else ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    43
  LIB_SUBDIR := lib
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    44
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    45
  LIB_SUBDIR := lib$(OPENJDK_TARGET_CPU_LIBDIR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    46
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    47
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    48
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    49
# Functions to setup copying of files for variants
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    50
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    51
# Support macro for SetupDistLibFile
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    52
define macosx_universalize
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    53
	$(MKDIR) -p $(@D)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    54
	$(LIPO) -create -output $@ $<
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    55
endef
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    56
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    58
# Setup make rules to copy a native library and associated data.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    59
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    60
# Parameter 1 is the name of the rule. This name is used as variable prefix,
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    61
# and the targets generated are listed in a variable by that name.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    62
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    63
# Remaining parameters are named arguments. These include:
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    64
#   NAME -- The base name of the native library (e.g. 'jvm')
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    65
#   VARIANT -- The variant to copy from
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
#   VARIANT_TARGET_DIR -- The variant target sub dir, with trailing slash, optional
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
SetupDistLibFile = $(NamedParamsMacroTemplate)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
define SetupDistLibFileBody
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
  ifneq ($$($1_VARIANT), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    70
    $1_SRC_DIR := $$(HOTSPOT_OUTPUTDIR)/variant-$$($1_VARIANT)/lib$$($1_NAME)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    71
  else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
    $1_SRC_DIR := $$(HOTSPOT_OUTPUTDIR)/lib$$($1_NAME)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
  $1_LIB_NAME := $(LIBRARY_PREFIX)$$($1_NAME)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
  $1_TARGET_DIR := $$(DIST_OUTPUTDIR)/$$(LIB_SUBDIR)/$$($1_VARIANT_TARGET_DIR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
  ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
    # We must use the 'universalize' macro to run lipo on shared libraries, at
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
    # least until JDK-8069540 is fixed.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
    $1_MACRO := macosx_universalize
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
  # Copy the the native library.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
  $$(eval $$(call SetupCopyFiles, $1_COPY_LIB, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
      DEST := $$($1_TARGET_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
      MACRO := $$($1_MACRO), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
      FILES := $$(wildcard \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
          $$($1_SRC_DIR)/$$($1_LIB_NAME)$(SHARED_LIBRARY_SUFFIX)), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    89
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
  TARGETS += $$($1_COPY_LIB)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
  # Copy related data (debug symbols, static-build symbols file etc)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
  $$(eval $$(call SetupCopyFiles, $1_COPY_FILES, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
      DEST := $$($1_TARGET_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
      FILES := $$(wildcard \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
          $$(addprefix $$($1_SRC_DIR)/$$($1_LIB_NAME), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
          .diz .debuginfo .pdb .map .symbols)), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
  TARGETS += $$($1_COPY_FILES)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
  ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
    # Debug symbols on macosx is a directory, not a single file, per library.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
    $1_DSYM_SRC := $$($1_SRC_DIR)/$$($1_LIB_NAME)$(SHARED_LIBRARY_SUFFIX).dSYM)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
    ifneq ($$(wildcard $$($1_DSYM_SRC)), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
      $$(eval $$(call SetupCopyFiles, $1_COPY_DSYM_DIR, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
          DEST := $$($1_TARGET_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
          SRC := $$($1_SRC_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
          FILES := $$(shell $(FIND) $$($1_DSYM_SRC) -type f), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
       ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
       TARGETS += $$($1_COPY_DSYM_DIR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
    endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
endef
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
# Copy common files, which are independent on the jvm variant(s) being built.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
# For files that were generated during the build, we assume all versions of
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
# these files are identical, and just pick one arbitrarily to use as source.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
ANY_JVM_VARIANT := $(firstword $(JVM_VARIANTS))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
JVM_VARIANT_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/variant-$(ANY_JVM_VARIANT)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   124
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
### Copy platform-independent .h files
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   126
INCLUDE_FILES_SRC_DIR := $(HOTSPOT_TOPDIR)/src/share/vm
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
$(eval $(call SetupCopyFiles, COPY_INCLUDE, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
    SRC := $(INCLUDE_FILES_SRC_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
    DEST := $(DIST_OUTPUTDIR)/include, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   130
    FLATTEN := true, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
    FILES := $(INCLUDE_FILES_SRC_DIR)/prims/jni.h \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   132
        $(INCLUDE_FILES_SRC_DIR)/code/jvmticmlr.h \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   133
        $(INCLUDE_FILES_SRC_DIR)/services/jmm.h))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   134
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   135
TARGETS += $(COPY_INCLUDE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   136
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   137
### Copy jni_md.h
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   138
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   139
# This might have been defined in a custom extension
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   140
ifeq ($(JNI_MD_H_SRC), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   141
  JNI_MD_H_SRC := $(HOTSPOT_TOPDIR)/src/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm/jni_$(HOTSPOT_TARGET_CPU_ARCH).h
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   142
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   143
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   144
ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   145
  # NOTE: This should most likely be darwin, but the old hotspot build uses bsd
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
  JNI_MD_SUBDIR := bsd
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
else ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
  JNI_MD_SUBDIR := win32
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   149
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   150
  JNI_MD_SUBDIR := $(OPENJDK_TARGET_OS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   151
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   152
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   153
# SetupCopyFiles is not used here since it's non-trivial to copy a single
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   154
# file with a different target name.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   155
$(DIST_OUTPUTDIR)/include/$(JNI_MD_SUBDIR)/jni_md.h: $(JNI_MD_H_SRC)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   156
	$(call LogInfo, Copying hotspot/dist/include/$(JNI_MD_SUBDIR)/jni_md.h)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   157
	$(install-file)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   158
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   159
TARGETS += $(DIST_OUTPUTDIR)/include/$(JNI_MD_SUBDIR)/jni_md.h
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   160
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   161
$(eval $(call SetupCopyFiles, COPY_JVMTI_H, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   162
    DEST := $(DIST_OUTPUTDIR)/include, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   163
    FLATTEN := true, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   164
    FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.h))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   165
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   166
TARGETS += $(COPY_JVMTI_H)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   167
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   168
# NOTE: In the old build, this file was not copied on Windows.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   169
ifneq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   170
  $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   171
      DEST := $(DIST_OUTPUTDIR)/docs/platform/jvmti, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   172
      FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.html))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   173
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   174
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   175
TARGETS += $(COPY_JVMTI_HTML)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   176
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   177
ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   178
  $(eval $(call SetupCopyFiles, COPY_JVM_LIB, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   179
      DEST := $(DIST_OUTPUTDIR)/lib, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   180
      FILES :=$(JVM_VARIANT_OUTPUTDIR)/libjvm/objs/jvm.lib))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   181
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   182
  TARGETS += $(COPY_JVM_LIB)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   183
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   184
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   185
# Copy libjsig, if it exists
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   186
$(eval $(call SetupDistLibFile, DIST_jsig, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   187
    NAME := jsig, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   188
))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   189
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   190
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   191
# Copy variant-specific files
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   192
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   193
# Setup make rules to copy a single variant to dist.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   194
# $1: The name of the variant
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   195
define SetupDistForVariant
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   196
  ifneq ($$(filter client minimal, $1), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   197
    VARIANT_TARGET_DIR := $1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   198
  else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   199
    # Use 'server' as default target directory name for all other variants.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   200
    VARIANT_TARGET_DIR := server
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   201
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   202
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   203
  $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   204
      NAME := jvm, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   205
      VARIANT := $1, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   206
      VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   207
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   208
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   209
  # Copy the dtrace libraries, if they exist
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   210
  $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm_db, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   211
      NAME := jvm_db, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   212
      VARIANT := $1, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   213
      VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   214
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   215
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   216
  $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm_dtrace, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   217
      NAME := jvm_dtrace, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   218
      VARIANT := $1, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   219
      VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   220
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   221
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   222
  # Copy the Xusage.txt file
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   223
  $$(eval $$(call SetupCopyFiles, DIST_$(strip $1)_Xusage, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   224
      DEST := $$(DIST_OUTPUTDIR)/$$(LIB_SUBDIR)/$(strip $1), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   225
      FILES := $$(HOTSPOT_OUTPUTDIR)/variant-$(strip $1)/support/misc/Xusage.txt, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   226
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   227
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   228
  TARGETS += $$(DIST_$(strip $1)_Xusage)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   229
endef
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   230
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   231
$(foreach variant, $(JVM_VARIANTS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   232
  $(eval $(call SetupDistForVariant, $(variant))) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   233
)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   234
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   235
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   236
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   237
all: $(TARGETS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   238
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   239
.PHONY: all