8328680: Introduce JDK_LIB, and clean up module native compilation

Reviewed-by: erikj, jwaters
This commit is contained in:
Magnus Ihse Bursie 2024-03-22 14:12:26 +00:00
parent 638708cad8
commit e80619a032
41 changed files with 345 additions and 207 deletions

View file

@ -26,25 +26,22 @@
include LibCommon.gmk
################################################################################
ifeq ($(call isTargetOsType, unix), true)
ifeq ($(call isTargetOs, macosx aix), false)
$(eval $(call SetupJdkLibrary, BUILD_LIBSCTP, \
NAME := sctp, \
OPTIMIZATION := LOW, \
EXTRA_HEADER_DIRS := \
$(call GetJavaHeaderDir, java.base) \
java.base:libnet \
java.base:libnio/ch, \
LIBS_unix := -lnio -lnet -ljava -ljvm, \
LIBS_linux := -lpthread $(LIBDL), \
))
TARGETS += $(BUILD_LIBSCTP)
$(BUILD_LIBSCTP): $(call FindLib, java.base, nio)
endif
endif
## Build libsctp
################################################################################
ifeq ($(call isTargetOs, linux), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBSCTP, \
NAME := sctp, \
OPTIMIZATION := LOW, \
EXTRA_HEADER_DIRS := \
$(call GetJavaHeaderDir, java.base) \
java.base:libnet \
java.base:libnio/ch, \
JDK_LIBS_unix := -ljava -ljvm -lnet -lnio, \
LIBS_linux := $(LIBDL) -lpthread, \
))
TARGETS += $(BUILD_LIBSCTP)
$(BUILD_LIBSCTP): $(call FindLib, java.base, nio)
endif