2018-03-15 00:20:47 +00:00
|
|
|
#
|
2024-03-15 14:36:57 +00:00
|
|
|
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
2018-03-15 00:20:47 +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.
|
|
|
|
#
|
|
|
|
|
|
|
|
ifndef _JDK_NATIVE_COMPILATION_GMK
|
|
|
|
_JDK_NATIVE_COMPILATION_GMK := 1
|
|
|
|
|
|
|
|
ifeq ($(_MAKEBASE_GMK), )
|
|
|
|
$(error You must include MakeBase.gmk prior to including JdkNativeCompilation.gmk)
|
|
|
|
endif
|
|
|
|
|
|
|
|
include NativeCompilation.gmk
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
# Hook to include the corresponding custom file, if present.
|
|
|
|
$(eval $(call IncludeCustomExtension, common/JdkNativeCompilation.gmk))
|
|
|
|
|
|
|
|
FindSrcDirsForLib += \
|
|
|
|
$(call uniq, $(wildcard \
|
|
|
|
$(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
|
|
|
|
$(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/lib$(strip $2) \
|
|
|
|
$(TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
|
|
|
|
|
|
|
|
FindSrcDirsForComponent += \
|
|
|
|
$(call uniq, $(wildcard \
|
|
|
|
$(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/$(strip $2) \
|
|
|
|
$(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/$(strip $2) \
|
|
|
|
$(TOPDIR)/src/$(strip $1)/share/native/$(strip $2)))
|
|
|
|
|
2019-10-29 19:01:14 +00:00
|
|
|
# Find a library. Used for declaring dependencies on libraries in different
|
|
|
|
# modules.
|
2018-10-05 05:54:28 +00:00
|
|
|
# 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
|
2019-10-29 19:01:14 +00:00
|
|
|
# If building static versions of libraries, make these return empty to avoid
|
|
|
|
# declaring dependencies.
|
|
|
|
ifeq ($(STATIC_LIBS), true)
|
|
|
|
FindLib =
|
|
|
|
FindStaticLib =
|
|
|
|
endif
|
2018-10-05 05:54:28 +00:00
|
|
|
|
2020-11-03 23:11:23 +00:00
|
|
|
# Returns the module specific java header dir if it exists.
|
|
|
|
# Param 1 - module name
|
2018-06-08 16:11:32 +00:00
|
|
|
GetJavaHeaderDir = \
|
2020-11-03 23:11:23 +00:00
|
|
|
$(if $(strip $1),$(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)))
|
2018-06-08 16:11:32 +00:00
|
|
|
|
|
|
|
# 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) \
|
|
|
|
) \
|
|
|
|
)
|
|
|
|
|
2020-07-01 20:39:58 +00:00
|
|
|
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
|
|
|
|
|
|
|
|
JDK_RCFLAGS=$(RCFLAGS) \
|
|
|
|
-D"JDK_VERSION_STRING=$(VERSION_STRING)" \
|
2023-12-08 14:09:01 +00:00
|
|
|
-D"JDK_COMPANY=$(JDK_RC_COMPANY_NAME)" \
|
2020-07-01 20:39:58 +00:00
|
|
|
-D"JDK_VER=$(VERSION_NUMBER_FOUR_POSITIONS)" \
|
|
|
|
-D"JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \
|
|
|
|
-D"JDK_NAME=$(JDK_RC_NAME) $(VERSION_SHORT)" \
|
|
|
|
-D"JDK_FVER=$(subst .,$(COMMA),$(VERSION_NUMBER_FOUR_POSITIONS))"
|
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
# 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
|
2018-06-08 16:11:32 +00:00
|
|
|
# SetupNativeCompilation, except for
|
2020-07-01 20:39:58 +00:00
|
|
|
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
|
2018-06-08 16:11:32 +00:00
|
|
|
# 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
|
2020-07-01 20:39:58 +00:00
|
|
|
# RC_FILEDESC -- override the default FILEDESC for Windows version.rc
|
2018-06-08 16:11:32 +00:00
|
|
|
# such as "java.base:headers".
|
2018-03-15 00:20:47 +00:00
|
|
|
SetupJdkLibrary = $(NamedParamsMacroTemplate)
|
|
|
|
define SetupJdkLibraryBody
|
|
|
|
ifeq ($$($1_OUTPUT_DIR), )
|
2020-11-03 23:11:23 +00:00
|
|
|
ifneq ($$(MODULE), )
|
2024-03-31 11:15:49 +00:00
|
|
|
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
|
|
|
$1_OUTPUT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)
|
|
|
|
else
|
|
|
|
$1_OUTPUT_DIR := $$(call FindLibDirForModule, $$(MODULE))
|
|
|
|
endif
|
2020-11-03 23:11:23 +00:00
|
|
|
else
|
|
|
|
$$(error Must specify OUTPUT_DIR in a MODULE free context)
|
|
|
|
endif
|
2018-03-15 00:20:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($$($1_OBJECT_DIR), )
|
2020-11-03 23:11:23 +00:00
|
|
|
ifneq ($$(MODULE), )
|
|
|
|
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/lib$$($1_NAME)
|
|
|
|
else
|
|
|
|
$$(error Must specify OBJECT_DIR in a MODULE free context)
|
|
|
|
endif
|
2018-03-15 00:20:47 +00:00
|
|
|
endif
|
|
|
|
|
2024-03-15 13:23:37 +00:00
|
|
|
ifeq ($$($1_LINK_TYPE), C++)
|
|
|
|
$1_LIBS += $(LIBCXX)
|
|
|
|
endif
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
ifeq ($$($1_SRC), )
|
2020-11-03 23:11:23 +00:00
|
|
|
ifneq ($$(MODULE), )
|
|
|
|
$1_SRC := $$(call FindSrcDirsForLib, $$(MODULE), $$($1_NAME))
|
|
|
|
else
|
|
|
|
$$(error Must specify SRC in a MODULE free context)
|
|
|
|
endif
|
2018-06-08 16:11:32 +00:00
|
|
|
else
|
|
|
|
$1_SRC := $$(foreach dir, $$($1_SRC), $$(call ProcessDir, $$(dir)))
|
|
|
|
endif
|
|
|
|
ifneq ($$($1_EXTRA_SRC), )
|
|
|
|
$1_SRC += $$(foreach dir, $$($1_EXTRA_SRC), $$(call ProcessDir, $$(dir)))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($$($1_EXCLUDE_SRC_PATTERNS), )
|
2019-06-03 17:52:18 +00:00
|
|
|
$1_SRC_WITHOUT_WORKSPACE_ROOT := $$(patsubst $$(WORKSPACE_ROOT)/%, %, $$($1_SRC))
|
|
|
|
$1_EXCLUDE_SRC := $$(addprefix %, $$(call containing, $$($1_EXCLUDE_SRC_PATTERNS), \
|
|
|
|
$$($1_SRC_WITHOUT_WORKSPACE_ROOT)))
|
2018-06-08 16:11:32 +00:00
|
|
|
$1_SRC := $$(filter-out $$($1_EXCLUDE_SRC), $$($1_SRC))
|
|
|
|
endif
|
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
ifeq ($$($1_VERSIONINFO_RESOURCE), )
|
|
|
|
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
|
|
|
|
endif
|
|
|
|
|
2020-07-01 20:39:58 +00:00
|
|
|
ifeq ($$($1_RC_FILEDESC), )
|
|
|
|
$1_RC_FILEDESC := $(JDK_RC_NAME) binary
|
2018-03-15 00:20:47 +00:00
|
|
|
endif
|
|
|
|
|
2020-07-01 20:39:58 +00:00
|
|
|
$1_RCFLAGS := $(JDK_RCFLAGS) \
|
|
|
|
-D"JDK_FILEDESC=$$(strip $$($1_RC_FILEDESC))" \
|
|
|
|
-D"JDK_FNAME=$$($1_NAME).dll" \
|
|
|
|
-D"JDK_INTERNAL_NAME=$$($1_NAME)" \
|
|
|
|
-D"JDK_FTYPE=0x2L" \
|
|
|
|
-I$(TOPDIR)/src/java.base/windows/native/common \
|
|
|
|
$$($1_EXTRA_RCFLAGS)
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
ifneq ($$($1_HEADERS_FROM_SRC), false)
|
2018-06-27 19:56:11 +00:00
|
|
|
$1_SRC_HEADER_FLAGS := $$(addprefix -I, $$(wildcard $$($1_SRC)))
|
2018-06-08 16:11:32 +00:00
|
|
|
endif
|
2020-11-03 23:11:23 +00:00
|
|
|
|
|
|
|
# Add the module specific java header dir
|
2018-06-27 19:56:11 +00:00
|
|
|
$1_SRC_HEADER_FLAGS += $$(addprefix -I, $$(call GetJavaHeaderDir, $$(MODULE)))
|
|
|
|
|
2024-03-22 14:12:26 +00:00
|
|
|
$1_JDK_LIBS += $$($1_JDK_LIBS_$$(OPENJDK_TARGET_OS))
|
|
|
|
$1_JDK_LIBS += $$($1_JDK_LIBS_$$(OPENJDK_TARGET_OS_TYPE))
|
|
|
|
# Prepend JDK libs before external libs
|
|
|
|
$1_LIBS := $$($1_JDK_LIBS) $$($1_LIBS)
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
ifneq ($$($1_EXTRA_HEADER_DIRS), )
|
|
|
|
$1_PROCESSED_EXTRA_HEADER_DIRS := $$(foreach dir, $$($1_EXTRA_HEADER_DIRS), \
|
|
|
|
$$(call ProcessDir, $$(dir)))
|
|
|
|
$1_EXTRA_HEADER_FLAGS := $$(addprefix -I, $$($1_PROCESSED_EXTRA_HEADER_DIRS))
|
|
|
|
endif
|
|
|
|
|
2024-03-15 14:36:57 +00:00
|
|
|
ifneq ($$($1_DEFAULT_CFLAGS), false)
|
|
|
|
# Set the default flags first to be able to override
|
|
|
|
$1_CFLAGS := $$(filter-out $$($1_CFLAGS_FILTER_OUT), $$(CFLAGS_JDKLIB)) $$($1_CFLAGS)
|
|
|
|
|
|
|
|
# Set the default flags first to be able to override
|
|
|
|
$1_CXXFLAGS := $$(filter-out $$($1_CXXFLAGS_FILTER_OUT), $$(CXXFLAGS_JDKLIB)) $$($1_CXXFLAGS)
|
|
|
|
endif
|
|
|
|
|
2018-06-08 16:11:32 +00:00
|
|
|
ifneq ($$($1_CFLAGS), )
|
|
|
|
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
|
|
|
|
endif
|
|
|
|
ifneq ($$($1_CXXFLAGS), )
|
|
|
|
$1_CXXFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
|
|
|
|
endif
|
|
|
|
ifeq ($$($1_CFLAGS)$$($1_CXXFLAGS), )
|
|
|
|
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
|
|
|
|
endif
|
2018-03-15 00:20:47 +00:00
|
|
|
|
2024-03-18 14:41:51 +00:00
|
|
|
ifneq ($$($1_DEFAULT_LDFLAGS), false)
|
|
|
|
# Set the default flags first to be able to override
|
|
|
|
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKLIB)) $$($1_LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($$($1_LD_SET_ORIGIN), false)
|
|
|
|
$1_LDFLAGS += $$(call SET_SHARED_LIBRARY_ORIGIN)
|
|
|
|
endif
|
|
|
|
# APPEND_LDFLAGS, if it exists, must be set after the origin flags
|
|
|
|
# This is a workaround to keep existing behavior
|
|
|
|
$1_LDFLAGS += $$($1_APPEND_LDFLAGS)
|
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
# 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
|
2018-06-08 16:11:32 +00:00
|
|
|
# SetupNativeCompilation, except for
|
2020-07-01 20:39:58 +00:00
|
|
|
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
|
2018-03-15 00:20:47 +00:00
|
|
|
SetupJdkExecutable = $(NamedParamsMacroTemplate)
|
|
|
|
define SetupJdkExecutableBody
|
|
|
|
$1_TYPE := EXECUTABLE
|
|
|
|
|
|
|
|
ifeq ($$($1_OUTPUT_DIR), )
|
2020-11-03 23:11:23 +00:00
|
|
|
ifneq ($$(MODULE), )
|
|
|
|
$1_OUTPUT_DIR := $$(call FindExecutableDirForModule, $$(MODULE))
|
|
|
|
else
|
|
|
|
$$(error Must specify OUTPUT_DIR in a MODULE free context)
|
|
|
|
endif
|
2018-03-15 00:20:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($$($1_OBJECT_DIR), )
|
2020-11-03 23:11:23 +00:00
|
|
|
ifneq ($$(MODULE), )
|
|
|
|
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$$($1_NAME)
|
|
|
|
else
|
|
|
|
$$(error Must specify OBJECT_DIR in a MODULE free context)
|
|
|
|
endif
|
2018-03-15 00:20:47 +00:00
|
|
|
endif
|
|
|
|
|
2024-03-15 13:23:37 +00:00
|
|
|
ifeq ($$($1_LINK_TYPE), C++)
|
|
|
|
$1_LIBS += $(LIBCXX)
|
|
|
|
endif
|
|
|
|
|
2024-03-25 15:04:38 +00:00
|
|
|
ifeq ($$($1_SRC), )
|
|
|
|
ifneq ($$(MODULE), )
|
|
|
|
$1_SRC := $$(call FindSrcDirsForComponent, $$(MODULE), $$($1_NAME))
|
|
|
|
else
|
|
|
|
$$(error Must specify SRC in a MODULE free context)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
$1_SRC := $$(foreach dir, $$($1_SRC), $$(call ProcessDir, $$(dir)))
|
|
|
|
endif
|
|
|
|
ifneq ($$($1_EXTRA_SRC), )
|
|
|
|
$1_SRC += $$(foreach dir, $$($1_EXTRA_SRC), $$(call ProcessDir, $$(dir)))
|
|
|
|
endif
|
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
ifeq ($$($1_VERSIONINFO_RESOURCE), )
|
|
|
|
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
|
|
|
|
endif
|
|
|
|
|
2020-07-01 20:39:58 +00:00
|
|
|
$1_RCFLAGS := $(JDK_RCFLAGS) \
|
|
|
|
-D"JDK_FILEDESC=$(JDK_RC_NAME) binary" \
|
|
|
|
-D"JDK_FNAME=$$($1_NAME).exe" \
|
|
|
|
-D"JDK_INTERNAL_NAME=$$($1_NAME)" \
|
|
|
|
-D"JDK_FTYPE=0x1L" \
|
|
|
|
-I$(TOPDIR)/src/java.base/windows/native/common \
|
|
|
|
$$($1_EXTRA_RCFLAGS)
|
2018-03-15 00:20:47 +00:00
|
|
|
|
2024-03-27 10:30:58 +00:00
|
|
|
ifneq ($$($1_HEADERS_FROM_SRC), false)
|
|
|
|
$1_SRC_HEADER_FLAGS := $$(addprefix -I, $$(wildcard $$($1_SRC)))
|
|
|
|
endif
|
|
|
|
|
2024-03-22 14:12:26 +00:00
|
|
|
$1_JDK_LIBS += $$($1_JDK_LIBS_$$(OPENJDK_TARGET_OS))
|
|
|
|
$1_JDK_LIBS += $$($1_JDK_LIBS_$$(OPENJDK_TARGET_OS_TYPE))
|
|
|
|
# Prepend JDK libs before external libs
|
|
|
|
$1_LIBS := $$($1_JDK_LIBS) $$($1_LIBS)
|
|
|
|
|
2024-03-25 15:04:38 +00:00
|
|
|
ifneq ($$($1_EXTRA_HEADER_DIRS), )
|
|
|
|
$1_PROCESSED_EXTRA_HEADER_DIRS := $$(foreach dir, $$($1_EXTRA_HEADER_DIRS), \
|
|
|
|
$$(call ProcessDir, $$(dir)))
|
|
|
|
$1_EXTRA_HEADER_FLAGS := $$(addprefix -I, $$($1_PROCESSED_EXTRA_HEADER_DIRS))
|
|
|
|
endif
|
|
|
|
|
2024-03-15 14:36:57 +00:00
|
|
|
ifneq ($$($1_DEFAULT_CFLAGS), false)
|
|
|
|
# Set the default flags first to be able to override
|
|
|
|
$1_CFLAGS := $$(filter-out $$($1_CFLAGS_FILTER_OUT), $$(CFLAGS_JDKEXE)) $$($1_CFLAGS)
|
|
|
|
|
|
|
|
# Set the default flags first to be able to override
|
|
|
|
$1_CXXFLAGS := $$(filter-out $$($1_CXXFLAGS_FILTER_OUT), $$(CXXFLAGS_JDKEXE)) $$($1_CXXFLAGS)
|
|
|
|
endif
|
|
|
|
|
2024-03-25 15:04:38 +00:00
|
|
|
ifneq ($$($1_CFLAGS), )
|
|
|
|
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
|
|
|
|
endif
|
|
|
|
ifneq ($$($1_CXXFLAGS), )
|
|
|
|
$1_CXXFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
|
|
|
|
endif
|
|
|
|
ifeq ($$($1_CFLAGS)$$($1_CXXFLAGS), )
|
|
|
|
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
|
|
|
|
endif
|
|
|
|
|
2024-03-18 14:41:51 +00:00
|
|
|
ifneq ($$($1_DEFAULT_LDFLAGS), false)
|
|
|
|
# Set the default flags first to be able to override
|
|
|
|
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKEXE)) $$($1_LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($$($1_LD_SET_ORIGIN), false)
|
|
|
|
$1_LDFLAGS += $$(call SET_EXECUTABLE_ORIGIN)
|
|
|
|
endif
|
|
|
|
|
2018-03-15 00:20:47 +00:00
|
|
|
# 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
|