2
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation. Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
26
include LauncherCommon.gmk
28
# Hook to include the corresponding custom file, if present.
29
$(eval $(call IncludeCustomExtension, modules/java.base/Launcher.gmk))
31
JAVA_VERSION_INFO_RESOURCE := \
32
$(TOPDIR)/src/java.base/windows/native/launcher/java.rc
34
JAVA_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
36
################################################################################
38
################################################################################
40
$(eval $(call SetupBuildLauncher, java, \
41
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
42
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
43
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
44
OPTIMIZATION := HIGH, \
47
################################################################################
49
################################################################################
51
ifeq ($(call isTargetOs, windows), true)
52
$(eval $(call SetupBuildLauncher, javaw, \
53
CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
54
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
55
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
59
################################################################################
61
################################################################################
63
$(eval $(call SetupBuildLauncher, keytool, \
64
MAIN_CLASS := sun.security.tools.keytool.Main, \
67
ifeq ($(call isTargetOs, linux), true)
68
##############################################################################
70
##############################################################################
72
$(eval $(call SetupJdkExecutable, BUILD_JEXEC, \
74
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \
75
OPTIMIZATION := LOW, \
76
EXTRA_HEADER_DIRS := libjli, \
77
CFLAGS_linux := -fPIC, \
78
LD_SET_ORIGIN := false, \
79
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
82
TARGETS += $(BUILD_JEXEC)
85
ifeq ($(call isTargetOsType, unix), true)
86
##############################################################################
88
##############################################################################
90
$(eval $(call SetupJdkExecutable, BUILD_JSPAWNHELPER, \
91
NAME := jspawnhelper, \
92
OPTIMIZATION := LOW, \
93
CFLAGS := $(VERSION_CFLAGS), \
94
EXTRA_HEADER_DIRS := libjava, \
95
EXTRA_OBJECT_FILES := \
96
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX), \
97
LD_SET_ORIGIN := false, \
98
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
101
TARGETS += $(BUILD_JSPAWNHELPER)