aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d071eed..5d5e771 100644
--- a/Makefile
+++ b/Makefile
@@ -10,12 +10,18 @@ ZIPFILES += $(STEMS:=.java)
include _make/*.mk
+# resolve Java version
+JAVA_MAJOR_VERSION := $(shell $(JAVA) -version 2>&1 \
+ | grep -Pom1 '"\K\d+' )
+
# silence security restriction warning
JAVAFLAGS += --enable-native-access=javafx.graphics
-# silence warnig specific to JDK 23-24
+# silence unsafe memory-access methods warning on recent JDKs
# @see <https://stackoverflow.com/a/79526038/18619283>
+ifeq ($(shell expr $(JAVA_MAJOR_VERSION) \>= 23), 1)
JAVAFLAGS += --sun-misc-unsafe-memory-access=allow
+endif
all:: render