1
1
#
2
- # Copyright (c) 2011, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ # Copyright (c) 2011, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
#
5
5
# This code is free software; you can redistribute it and/or modify it
@@ -48,41 +48,44 @@ JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
48
48
# used as the name of the executable.
49
49
#
50
50
# Remaining parameters are named arguments. These include:
51
- # MAIN_MODULE The module of the main class to launch if different from the
52
- # current module
53
51
# MAIN_CLASS The Java main class to launch
54
- # JAVA_ARGS Processed into a -DJAVA_ARGS and added to CFLAGS
55
- # EXTRA_JAVA_ARGS Processed into a -DEXTRA_JAVA_ARGS and is prepended
56
- # before JAVA_ARGS to CFLAGS, primarily to allow long string literal
57
- # compile time defines exceeding Visual Studio 2013 limitations.
58
- # CFLAGS Additional CFLAGS
59
- # CFLAGS_windows Additional CFLAGS_windows
52
+ # JAVA_ARGS Additional arguments to pass to Java when launching the main class
53
+ # EXPAND_CLASSPATH_WILDCARDS Set to true to pass EXPAND_CLASSPATH_WILDCARDS
54
+ # ENABLE_ARG_FILES Set to true to pass ENABLE_ARG_FILES
55
+ # WINDOWS_JAVAW Set to true to pass JAVAW on Windows
60
56
# EXTRA_RCFLAGS Additional EXTRA_RCFLAGS
61
57
# MACOSX_PRIVILEGED On macosx, allow to access other processes
62
58
# OPTIMIZATION Override default optimization level (LOW)
63
59
# OUTPUT_DIR Override default output directory
64
60
# VERSION_INFO_RESOURCE Override default Windows resource file
65
61
# STATIC_LAUNCHER If true, will use settings for building a static launcher
62
+ # LIBS Additional libraries to pass as LIBS argument to SetupJdkExecutable
66
63
SetupBuildLauncher = $(NamedParamsMacroTemplate)
67
64
define SetupBuildLauncherBody
68
65
# Setup default values (unless overridden)
69
66
ifeq ($$($1_OPTIMIZATION), )
70
67
$1_OPTIMIZATION := LOW
71
68
endif
72
69
73
- ifeq ($$($1_MAIN_MODULE), )
74
- $1_MAIN_MODULE := $(MODULE)
75
- endif
70
+ $1_MAIN_MODULE := $(MODULE)
76
71
77
72
ifneq ($$($1_MAIN_CLASS), )
78
73
$1_JAVA_ARGS += -Xms8m
79
74
$1_LAUNCHER_CLASS := -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS)
80
75
endif
81
76
82
- ifneq ($$($1_EXTRA_JAVA_ARGS), )
83
- $1_EXTRA_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
84
- $$(addprefix -J, $$($1_EXTRA_JAVA_ARGS)), "$$a"$(COMMA) )) }'
85
- $1_CFLAGS += -DEXTRA_JAVA_ARGS=$$($1_EXTRA_JAVA_ARGS_STR)
77
+ ifeq ($$($1_EXPAND_CLASSPATH_WILDCARDS), true)
78
+ $1_CFLAGS += -DEXPAND_CLASSPATH_WILDCARDS
79
+ endif
80
+
81
+ ifeq ($$($1_ENABLE_ARG_FILES), true)
82
+ $1_CFLAGS += -DENABLE_ARG_FILES
83
+ endif
84
+
85
+ ifeq ($(call isTargetOs, windows), true)
86
+ ifeq ($$($1_WINDOWS_JAVAW), true)
87
+ $1_CFLAGS += -DJAVAW
88
+ endif
86
89
endif
87
90
88
91
ifneq ($$($1_JAVA_ARGS), )
@@ -143,8 +146,8 @@ define SetupBuildLauncherBody
143
146
-DLAUNCHER_NAME='"$$(LAUNCHER_NAME)"' \
144
147
-DPROGNAME='"$1"' \
145
148
$$($1_CFLAGS), \
146
- CFLAGS_windows := $$($1_CFLAGS_windows), \
147
149
EXTRA_HEADER_DIRS := java.base:libjvm, \
150
+ JAVA_HEADERS := false, \
148
151
DISABLED_WARNINGS_gcc := unused-function unused-variable, \
149
152
DISABLED_WARNINGS_clang := unused-function, \
150
153
LDFLAGS := $$($1_LDFLAGS), \
@@ -154,12 +157,6 @@ define SetupBuildLauncherBody
154
157
JDK_LIBS := $$($1_JDK_LIBS), \
155
158
JDK_LIBS_windows := $$($1_JDK_LIBS_windows), \
156
159
LIBS := $$($1_LIBS), \
157
- LIBS_unix := $(LIBZ_LIBS), \
158
- LIBS_linux := $(LIBDL) -lpthread, \
159
- LIBS_macosx := \
160
- -framework ApplicationServices \
161
- -framework Cocoa \
162
- -framework Security, \
163
160
LINK_TYPE := $$($1_LINK_TYPE), \
164
161
OUTPUT_DIR := $$($1_OUTPUT_DIR), \
165
162
OBJECT_DIR := $$($1_OBJECT_DIR), \
0 commit comments