# # Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. # 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. #
# Find a library. Used for declaring dependencies on libraries in different # modules. # Param 1 - module name # Param 2 - library name # Param 3 - optional subdir for library
FindLib = \
$(call FindLibDirForModule, \
$(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX)
# Find a static library # Param 1 - module name # Param 2 - library name # Param 3 - optional subdir for library
FindStaticLib = \
$(addprefix $(SUPPORT_OUTPUTDIR)/native/, \
$(strip $1)$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(STATIC_LIBRARY_SUFFIX))
# If only generating compile_commands.json, make these return empty to avoid # declaring dependencies. ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
FindLib =
FindStaticLib = endif # If building static versions of libraries, make these return empty to avoid # declaring dependencies. ifeq ($(STATIC_LIBS), true)
FindLib =
FindStaticLib = endif
# Returns the module specific java header dir if it exists. # Param 1 - module name
GetJavaHeaderDir = \
$(if $(strip $1),$(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)))
# Process a dir description such as "java.base:headers" into a set of proper absolute paths.
ProcessDir = \
$(if $(findstring :, $1), \
$(call FindSrcDirsForComponent, $(firstword $(subst :, , $1)), $(lastword $(subst :, , $1))) \
, \
$(if $(filter /%, $1), \
$1 \
, \
$(call FindSrcDirsForComponent, $(MODULE), $1) \
) \
)
# Setup make rules for creating a native shared library with suitable defaults # for the OpenJDK project. # # Parameter 1 is the name of the rule. This name is used as variable prefix, # and the targets generated are listed in a variable by that name. # # Remaining parameters are named arguments. These are all passed on to # SetupNativeCompilation, except for # EXTRA_RCFLAGS -- additional RCFLAGS to append. # EXTRA_HEADER_DIRS -- additional directories to look for headers in # EXTRA_SRC -- additional directories to look for source in # EXCLUDE_SRC_PATTERNS -- exclude source dirs matching these patterns from # appearing in SRC. # HEADERS_FROM_SRC -- if false, does not add source dirs automatically as # header include dirs. (Defaults to true.) # SRC -- this is passed on, but preprocessed to accept source dir designations # RC_FILEDESC -- override the default FILEDESC for Windows version.rc # such as "java.base:headers".
SetupJdkLibrary = $(NamedParamsMacroTemplate) define SetupJdkLibraryBody ifeq ($$($1_OUTPUT_DIR), ) ifneq ($$(MODULE), )
$1_OUTPUT_DIR := $$(call FindLibDirForModule, $$(MODULE)) else
$$(error Must specify OUTPUT_DIR in a MODULE free context) endif endif
ifeq ($$($1_OBJECT_DIR), ) ifneq ($$(MODULE), )
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/lib$$($1_NAME) else
$$(error Must specify OBJECT_DIR in a MODULE free context) endif endif
# Since we reuse the rule name ($1), all our arguments will pass through. # We lose in transparency, but gain in brevity in this call...
$$(eval $$(call SetupNativeCompilation, $1, )) endef
# Setup make rules for creating a native executable with suitable defaults for # the OpenJDK project. # # Parameter 1 is the name of the rule. This name is used as variable prefix, # and the targets generated are listed in a variable by that name. # # Remaining parameters are named arguments. These are all passed on to # SetupNativeCompilation, except for # EXTRA_RCFLAGS -- additional RCFLAGS to append.
SetupJdkExecutable = $(NamedParamsMacroTemplate) define SetupJdkExecutableBody
$1_TYPE := EXECUTABLE
ifeq ($$($1_OUTPUT_DIR), ) ifneq ($$(MODULE), )
$1_OUTPUT_DIR := $$(call FindExecutableDirForModule, $$(MODULE)) else
$$(error Must specify OUTPUT_DIR in a MODULE free context) endif endif
ifeq ($$($1_OBJECT_DIR), ) ifneq ($$(MODULE), )
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$$($1_NAME) else
$$(error Must specify OBJECT_DIR in a MODULE free context) endif endif
# Since we reuse the rule name ($1), all our arguments will pass through. # We lose in transparency, but gain in brevity in this call...
$$(eval $$(call SetupNativeCompilation, $1)) endef
endif# _JDK_NATIVE_COMPILATION_GMK
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.