2014-08-17 14:54:13 +00:00
|
|
|
#
|
2024-08-22 10:31:34 +00:00
|
|
|
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
|
2014-08-17 14:54:13 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
|
|
|
include CopyCommon.gmk
|
2018-04-05 21:46:05 +00:00
|
|
|
include Modules.gmk
|
2017-12-20 17:14:06 +00:00
|
|
|
include TextFileProcessing.gmk
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2020-04-29 06:55:01 +00:00
|
|
|
# Hook to include the corresponding custom file, if present.
|
|
|
|
$(eval $(call IncludeCustomExtension, modules/java.base/Copy.gmk))
|
2014-08-17 14:54:13 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, aix), true)
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2017-09-12 17:03:56 +00:00
|
|
|
TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2014-08-21 09:05:35 +00:00
|
|
|
$(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
|
2014-08-17 14:54:13 +00:00
|
|
|
$(call install-file)
|
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(LIB_DST_DIR)/tzmappings
|
2014-08-17 14:54:13 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
2020-12-07 15:55:53 +00:00
|
|
|
# Copy the microsoft runtime libraries on windows, but only if we are not
|
|
|
|
# creating a buildjdk. If we are, the provided runtime librareis are made for
|
|
|
|
# the target platform, not the build platform (and we should not need to bundle
|
|
|
|
# anything with the minimalistic, locally-only buildjdk.)
|
|
|
|
ifeq ($(call isTargetOs, windows)+$(CREATING_BUILDJDK), true+false)
|
2015-01-15 15:52:10 +00:00
|
|
|
|
2014-08-17 14:54:13 +00:00
|
|
|
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
|
2015-01-15 15:52:10 +00:00
|
|
|
# Use separate macro calls in case the source files are not in the same
|
|
|
|
# directory.
|
2024-08-22 10:31:34 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_MSVCR, \
|
2015-01-15 15:52:10 +00:00
|
|
|
DEST := $(LIB_DST_DIR), \
|
|
|
|
FILES := $(MSVCR_DLL), \
|
2024-08-22 10:31:34 +00:00
|
|
|
MACRO := copy-and-chmod-executable, \
|
|
|
|
))
|
2015-01-15 15:52:10 +00:00
|
|
|
|
2024-08-22 10:31:34 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_VCRUNTIME_1, \
|
2020-04-14 14:58:08 +00:00
|
|
|
DEST := $(LIB_DST_DIR), \
|
|
|
|
FILES := $(VCRUNTIME_1_DLL), \
|
2024-08-22 10:31:34 +00:00
|
|
|
MACRO := copy-and-chmod-executable, \
|
|
|
|
))
|
2020-04-14 14:58:08 +00:00
|
|
|
|
2024-08-22 10:31:34 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_MSVCP, \
|
2015-01-15 15:52:10 +00:00
|
|
|
DEST := $(LIB_DST_DIR), \
|
|
|
|
FILES := $(MSVCP_DLL), \
|
2024-08-22 10:31:34 +00:00
|
|
|
MACRO := copy-and-chmod-executable, \
|
|
|
|
))
|
2014-12-03 14:22:58 +00:00
|
|
|
|
2020-04-14 14:58:08 +00:00
|
|
|
TARGETS += $(COPY_MSVCR) $(COPY_VCRUNTIME_1) $(COPY_MSVCP)
|
2018-05-09 17:50:30 +00:00
|
|
|
|
|
|
|
ifneq ($(UCRT_DLL_DIR), )
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_UCRT_DLLS, \
|
|
|
|
DEST := $(LIB_DST_DIR), \
|
|
|
|
SRC := $(UCRT_DLL_DIR), \
|
|
|
|
FILES := $(wildcard $(UCRT_DLL_DIR)/*.dll), \
|
2024-08-22 10:31:34 +00:00
|
|
|
MACRO := copy-and-chmod-executable, \
|
2018-05-09 17:50:30 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(COPY_UCRT_DLLS)
|
|
|
|
endif
|
2014-08-17 14:54:13 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
2018-05-16 16:40:57 +00:00
|
|
|
# In jvm.cfg, the first listed KNOWN variant is the default. On most build
|
|
|
|
# configurations, that is the server variant.
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
|
2018-05-16 16:40:57 +00:00
|
|
|
DEFAULT_CFG_VARIANT ?= client
|
2014-08-17 14:54:13 +00:00
|
|
|
endif
|
2018-05-16 16:40:57 +00:00
|
|
|
DEFAULT_CFG_VARIANT ?= server
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2018-05-16 16:40:57 +00:00
|
|
|
# Change the order to put the default variant first if present.
|
|
|
|
ORDERED_CFG_VARIANTS := \
|
2021-09-21 06:00:06 +00:00
|
|
|
$(if $(filter $(DEFAULT_CFG_VARIANT), $(JVM_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
|
|
|
|
$(filter-out $(DEFAULT_CFG_VARIANT), $(JVM_VARIANTS))
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2018-05-16 16:40:57 +00:00
|
|
|
JVMCFG := $(LIB_DST_DIR)/jvm.cfg
|
|
|
|
|
|
|
|
define print-cfg-line
|
|
|
|
$(call LogInfo, Adding -$1 $2 to jvm.cfg)
|
|
|
|
$(PRINTF) -- "-$1 $2\n" >> $@ $(NEWLINE)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(JVMCFG): $(call DependOnVariable, ORDERED_CFG_VARIANTS)
|
|
|
|
$(call MakeTargetDir)
|
|
|
|
$(RM) $@
|
|
|
|
$(foreach v, $(ORDERED_CFG_VARIANTS), \
|
|
|
|
$(call print-cfg-line,$v,KNOWN) \
|
|
|
|
)
|
|
|
|
# If either of server or client aren't present, add IGNORE lines for
|
|
|
|
# them.
|
|
|
|
$(foreach v, server client, \
|
|
|
|
$(if $(filter $v, $(ORDERED_CFG_VARIANTS)), , \
|
|
|
|
$(call print-cfg-line,$v,IGNORE) \
|
|
|
|
) \
|
|
|
|
)
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2014-12-03 14:22:58 +00:00
|
|
|
TARGETS += $(JVMCFG)
|
2014-08-17 14:54:13 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2019-06-05 01:58:05 +00:00
|
|
|
# CACERTS_FILE is optionally set in configure to override the default cacerts
|
|
|
|
# which is otherwise generated in Gendata-java.base.gmk
|
2014-12-03 14:22:58 +00:00
|
|
|
CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
|
2014-08-17 14:54:13 +00:00
|
|
|
|
|
|
|
$(CACERTS_DST): $(CACERTS_FILE)
|
2017-09-25 08:32:00 +00:00
|
|
|
$(call LogInfo, Copying $(patsubst $(OUTPUTDIR)/%, %, $@))
|
2014-08-17 14:54:13 +00:00
|
|
|
$(call install-file)
|
|
|
|
|
2019-06-05 01:58:05 +00:00
|
|
|
ifneq ($(CACERTS_FILE), )
|
|
|
|
TARGETS += $(CACERTS_DST)
|
|
|
|
endif
|
2014-08-17 14:54:13 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2020-10-28 17:26:26 +00:00
|
|
|
NET_PROPERTIES_SRCS := $(TOPDIR)/src/java.base/share/conf/net.properties \
|
|
|
|
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/net.properties
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2020-10-28 17:26:26 +00:00
|
|
|
NET_PROPERTIES_DST := $(CONF_DST_DIR)/net.properties
|
|
|
|
|
|
|
|
$(NET_PROPERTIES_DST): $(NET_PROPERTIES_SRCS)
|
|
|
|
$(call MakeTargetDir)
|
|
|
|
$(CAT) $(NET_PROPERTIES_SRCS) > $@
|
|
|
|
|
|
|
|
TARGETS += $(NET_PROPERTIES_DST)
|
2014-08-17 14:54:13 +00:00
|
|
|
|
8244224: Implementation of JEP 381: Remove the Solaris and SPARC Ports
Reviewed-by: alanb, bchristi, dcubed, dfuchs, eosterlund, erikj, glaubitz, ihse, iignatyev, jjiang, kbarrett, ksrini, kvn, naoto, prr, rriggs, serb, sspitsyn, stefank, tschatzl, valeriep, weijun, weijun
2020-05-21 00:33:37 +00:00
|
|
|
ifeq ($(call isTargetOs, linux), true)
|
2016-01-16 12:01:44 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
|
2017-09-12 17:03:56 +00:00
|
|
|
FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
|
2016-01-16 12:01:44 +00:00
|
|
|
DEST := $(CONF_DST_DIR)/sdp, \
|
|
|
|
))
|
2014-08-17 14:54:13 +00:00
|
|
|
|
2016-01-16 12:01:44 +00:00
|
|
|
TARGETS += $(COPY_SDP_CONF)
|
2014-08-17 14:54:13 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
2016-12-13 02:56:50 +00:00
|
|
|
|
|
|
|
# JDK license and assembly exception files to be packaged in JMOD
|
|
|
|
|
2017-03-16 13:46:50 +00:00
|
|
|
# The license files may not be present if the source has been obtained using a
|
|
|
|
# different license.
|
|
|
|
JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE)
|
|
|
|
JDK_NOTICE ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION)
|
2017-12-14 17:20:33 +00:00
|
|
|
JDK_ADDITIONAL_LICENSE_INFO ?= $(wildcard $(TOPDIR)/ADDITIONAL_LICENSE_INFO)
|
2016-12-13 02:56:50 +00:00
|
|
|
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
|
2017-12-14 17:20:33 +00:00
|
|
|
FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \
|
2018-04-05 21:46:05 +00:00
|
|
|
DEST := $(COMMON_LEGAL_DST_DIR), \
|
2016-12-13 02:56:50 +00:00
|
|
|
FLATTEN := true, \
|
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(COPY_JDK_NOTICES)
|
2017-10-17 13:47:53 +00:00
|
|
|
|
|
|
|
################################################################################
|
2018-04-05 21:46:05 +00:00
|
|
|
#
|
|
|
|
# Copy and filter the legal files depending on what 3rd party components are
|
|
|
|
# bundled or linked from the OS.
|
|
|
|
#
|
|
|
|
ifeq ($(USE_EXTERNAL_LIBZ), true)
|
|
|
|
LEGAL_EXCLUDES += zlib.md
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
|
|
|
|
EXCLUDES := $(LEGAL_EXCLUDES), \
|
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(COPY_LEGAL)
|
|
|
|
|
|
|
|
################################################################################
|
2022-05-24 20:08:11 +00:00
|
|
|
# Optionally copy libffi.so.? into the image
|
2017-10-17 13:47:53 +00:00
|
|
|
|
|
|
|
ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_LIBFFI, \
|
|
|
|
FILES := $(LIBFFI_LIB_FILE), \
|
|
|
|
DEST := $(call FindLibDirForModule, $(MODULE)), \
|
|
|
|
FLATTEN := true, \
|
|
|
|
MACRO := install-file-nolink, \
|
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(COPY_LIBFFI)
|
|
|
|
endif
|
|
|
|
|
2024-03-25 15:04:38 +00:00
|
|
|
################################################################################
|
|
|
|
# Copy tzmappings file for Windows
|
|
|
|
|
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_TZMAPPINGS, \
|
|
|
|
FILES := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/windows/conf/tzmappings, \
|
|
|
|
DEST := $(call FindLibDirForModule, $(MODULE)), \
|
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(COPY_TZMAPPINGS)
|
|
|
|
endif
|
|
|
|
|
2022-03-02 18:17:47 +00:00
|
|
|
################################################################################
|
2022-05-24 20:08:11 +00:00
|
|
|
# Optionally copy hsdis into the image
|
2022-03-02 18:17:47 +00:00
|
|
|
|
|
|
|
ifeq ($(ENABLE_HSDIS_BUNDLING), true)
|
|
|
|
HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
|
|
|
|
HSDIS_PATH := $(SUPPORT_OUTPUTDIR)/hsdis/$(HSDIS_NAME)
|
|
|
|
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_HSDIS, \
|
|
|
|
FILES := $(HSDIS_PATH), \
|
|
|
|
DEST := $(call FindLibDirForModule, $(MODULE)), \
|
|
|
|
FLATTEN := true, \
|
|
|
|
MACRO := install-file-nolink, \
|
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(COPY_HSDIS)
|
|
|
|
endif
|
|
|
|
|
2017-10-17 13:47:53 +00:00
|
|
|
################################################################################
|
2017-12-20 17:14:06 +00:00
|
|
|
# Generate classfile_constants.h
|
|
|
|
|
|
|
|
$(eval $(call SetupTextFileProcessing, CREATE_CLASSFILE_CONSTANTS_H, \
|
|
|
|
SOURCE_FILES := $(TOPDIR)/src/java.base/share/native/include/classfile_constants.h.template, \
|
|
|
|
OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/modules_include/java.base/classfile_constants.h, \
|
|
|
|
REPLACEMENTS := \
|
|
|
|
@@VERSION_CLASSFILE_MAJOR@@ => $(VERSION_CLASSFILE_MAJOR) ; \
|
|
|
|
@@VERSION_CLASSFILE_MINOR@@ => $(VERSION_CLASSFILE_MINOR) ; , \
|
|
|
|
))
|
|
|
|
|
|
|
|
TARGETS += $(CREATE_CLASSFILE_CONSTANTS_H)
|
|
|
|
|
|
|
|
################################################################################
|