hotspot/make/Dist.gmk
author erikj
Mon, 26 Sep 2016 14:57:00 +0200
changeset 41046 bee72dd4067b
parent 40381 1f2c47214988
permissions -rw-r--r--
8163102: Fix headless only configuration option Reviewed-by: tbell
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
# Setup make rules to copy a native library and associated data.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    50
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    51
# 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
    52
# and the targets generated are listed in a variable by that name.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    53
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    54
# Remaining parameters are named arguments. These include:
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    55
#   NAME -- The base name of the native library (e.g. 'jvm')
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    56
#   VARIANT -- The variant to copy from
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
#   VARIANT_TARGET_DIR -- The variant target sub dir, with trailing slash, optional
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    58
SetupDistLibFile = $(NamedParamsMacroTemplate)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    59
define SetupDistLibFileBody
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    60
  ifneq ($$($1_VARIANT), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    61
    $1_SRC_DIR := $$(HOTSPOT_OUTPUTDIR)/variant-$$($1_VARIANT)/lib$$($1_NAME)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    62
  else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    63
    $1_SRC_DIR := $$(HOTSPOT_OUTPUTDIR)/lib$$($1_NAME)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    64
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    65
  $1_LIB_NAME := $(LIBRARY_PREFIX)$$($1_NAME)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
  $1_TARGET_DIR := $$(DIST_OUTPUTDIR)/$$(LIB_SUBDIR)/$$($1_VARIANT_TARGET_DIR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
  # Copy the the native library.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
  $$(eval $$(call SetupCopyFiles, $1_COPY_LIB, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    70
      DEST := $$($1_TARGET_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    71
      FILES := $$(wildcard \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
          $$($1_SRC_DIR)/$$($1_LIB_NAME)$(SHARED_LIBRARY_SUFFIX)), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
  TARGETS += $$($1_COPY_LIB)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
  # Copy related data (debug symbols, static-build symbols file etc)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
  $$(eval $$(call SetupCopyFiles, $1_COPY_FILES, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
      DEST := $$($1_TARGET_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
      FILES := $$(wildcard \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
          $$(addprefix $$($1_SRC_DIR)/$$($1_LIB_NAME), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
          .diz .debuginfo .pdb .map .symbols)), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
  TARGETS += $$($1_COPY_FILES)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
  ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
    # Debug symbols on macosx is a directory, not a single file, per library.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    89
    $1_DSYM_SRC := $$($1_SRC_DIR)/$$($1_LIB_NAME)$(SHARED_LIBRARY_SUFFIX).dSYM)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
    ifneq ($$(wildcard $$($1_DSYM_SRC)), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
      $$(eval $$(call SetupCopyFiles, $1_COPY_DSYM_DIR, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
          DEST := $$($1_TARGET_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
          SRC := $$($1_SRC_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
          FILES := $$(shell $(FIND) $$($1_DSYM_SRC) -type f), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
       ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
       TARGETS += $$($1_COPY_DSYM_DIR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
    endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
endef
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
# Copy common files, which are independent on the jvm variant(s) being built.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
# For files that were generated during the build, we assume all versions of
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
# these files are identical, and just pick one arbitrarily to use as source.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
ANY_JVM_VARIANT := $(firstword $(JVM_VARIANTS))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
JVM_VARIANT_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/variant-$(ANY_JVM_VARIANT)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
### Copy platform-independent .h files
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
INCLUDE_FILES_SRC_DIR := $(HOTSPOT_TOPDIR)/src/share/vm
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
$(eval $(call SetupCopyFiles, COPY_INCLUDE, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
    SRC := $(INCLUDE_FILES_SRC_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
    DEST := $(DIST_OUTPUTDIR)/include, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
    FLATTEN := true, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
    FILES := $(INCLUDE_FILES_SRC_DIR)/prims/jni.h \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
        $(INCLUDE_FILES_SRC_DIR)/code/jvmticmlr.h \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
        $(INCLUDE_FILES_SRC_DIR)/services/jmm.h))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
TARGETS += $(COPY_INCLUDE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
### Copy jni_md.h
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
# This might have been defined in a custom extension
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   124
ifeq ($(JNI_MD_H_SRC), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
  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
   126
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
  # 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
   130
  JNI_MD_SUBDIR := bsd
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
else ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   132
  JNI_MD_SUBDIR := win32
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   133
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   134
  JNI_MD_SUBDIR := $(OPENJDK_TARGET_OS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   135
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   136
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   137
# 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
   138
# file with a different target name.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   139
$(DIST_OUTPUTDIR)/include/$(JNI_MD_SUBDIR)/jni_md.h: $(JNI_MD_H_SRC)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   140
	$(call LogInfo, Copying hotspot/dist/include/$(JNI_MD_SUBDIR)/jni_md.h)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   141
	$(install-file)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   142
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   143
TARGETS += $(DIST_OUTPUTDIR)/include/$(JNI_MD_SUBDIR)/jni_md.h
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   144
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   145
$(eval $(call SetupCopyFiles, COPY_JVMTI_H, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
    DEST := $(DIST_OUTPUTDIR)/include, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
    FLATTEN := true, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
    FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.h))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   149
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   150
TARGETS += $(COPY_JVMTI_H)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   151
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   152
# NOTE: In the old build, this file was not copied on Windows.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   153
ifneq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   154
  $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   155
      DEST := $(DIST_OUTPUTDIR)/docs/platform/jvmti, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   156
      FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.html))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   157
endif
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 += $(COPY_JVMTI_HTML)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   160
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   161
ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   162
  $(eval $(call SetupCopyFiles, COPY_JVM_LIB, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   163
      DEST := $(DIST_OUTPUTDIR)/lib, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   164
      FILES :=$(JVM_VARIANT_OUTPUTDIR)/libjvm/objs/jvm.lib))
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_JVM_LIB)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   167
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   168
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   169
# Copy libjsig, if it exists
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   170
$(eval $(call SetupDistLibFile, DIST_jsig, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   171
    NAME := jsig, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   172
))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   173
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   174
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   175
# Copy variant-specific files
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   176
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   177
# Setup make rules to copy a single variant to dist.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   178
# $1: The name of the variant
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   179
define SetupDistForVariant
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   180
  ifneq ($$(filter client minimal, $1), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   181
    VARIANT_TARGET_DIR := $1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   182
  else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   183
    # Use 'server' as default target directory name for all other variants.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   184
    VARIANT_TARGET_DIR := server
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   185
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   186
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   187
  $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   188
      NAME := jvm, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   189
      VARIANT := $1, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   190
      VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   191
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   192
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   193
  # Copy the dtrace libraries, if they exist
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   194
  $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm_db, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   195
      NAME := jvm_db, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   196
      VARIANT := $1, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   197
      VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   198
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   199
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   200
  $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm_dtrace, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   201
      NAME := jvm_dtrace, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   202
      VARIANT := $1, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   203
      VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   204
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   205
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   206
  # Copy the Xusage.txt file
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   207
  $$(eval $$(call SetupCopyFiles, DIST_$(strip $1)_Xusage, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   208
      DEST := $$(DIST_OUTPUTDIR)/$$(LIB_SUBDIR)/$(strip $1), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   209
      FILES := $$(HOTSPOT_OUTPUTDIR)/variant-$(strip $1)/support/misc/Xusage.txt, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   210
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   211
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   212
  TARGETS += $$(DIST_$(strip $1)_Xusage)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   213
endef
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   214
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   215
$(foreach variant, $(JVM_VARIANTS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   216
  $(eval $(call SetupDistForVariant, $(variant))) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   217
)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   218
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   219
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   220
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   221
all: $(TARGETS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   222
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   223
.PHONY: all