mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8200229: Simplify building of libjsig
Reviewed-by: erikj
This commit is contained in:
parent
ab65d126af
commit
01e9695dbd
3 changed files with 52 additions and 167 deletions
|
@ -170,6 +170,56 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
|||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Create the jsig library
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(STATIC_BUILD), false)
|
||||
|
||||
LIBJSIG_SRC_DIR := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjsig
|
||||
LIBJSIG_MAPFILE := $(wildcard $(TOPDIR)/make/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS))
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJSIG, \
|
||||
NAME := jsig, \
|
||||
SRC := $(LIBJSIG_SRC_DIR), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS_linux := $(LIBDL), \
|
||||
LIBS_solaris := $(LIBDL), \
|
||||
LIBS_aix := $(LIBDL), \
|
||||
MAPFILE := $(LIBJSIG_MAPFILE), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJSIG)
|
||||
|
||||
############################################################################
|
||||
# Create symlinks to libjsig in each JVM variant sub dir
|
||||
LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
|
||||
|
||||
# $1 variant subdir
|
||||
define CreateSymlinks
|
||||
# Always symlink from libdir/variant/libjsig.so -> ../libjsig.so.
|
||||
$(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig): \
|
||||
$(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$(RM) $$@
|
||||
$(LN) -s ../$$(@F) $$@
|
||||
|
||||
TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
|
||||
endef
|
||||
|
||||
# The subdir is the same as the variant for client and minimal, for all
|
||||
# others it's server.
|
||||
VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \
|
||||
$(if $(filter-out client minimal, $(JVM_VARIANTS)), server)
|
||||
$(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v)))
|
||||
|
||||
############################################################################
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Create the symbols file for static builds.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue