mk: omit the creation of .lib.so files for ABIs

Furthermore, the patch alleviates the need for providing a library
description file if the library is present in the form of an ABI-symbols
file only.
This commit is contained in:
Norman Feske 2017-03-15 19:02:38 +01:00 committed by Christian Helmuth
parent 6d82dd14d6
commit 0b30cf0ab6
2 changed files with 26 additions and 15 deletions

View File

@ -47,10 +47,14 @@ SYMBOLS_DIRS = $(foreach REP,$(REPOSITORIES),$(addprefix $(REP)/lib/symbols/spec
LIB_MK = $(firstword $(wildcard $(addsuffix /$(LIB).mk,$(LIB_MK_DIRS))))
SYMBOLS = $(firstword $(wildcard $(addsuffix /$(LIB), $(SYMBOLS_DIRS))))
ifneq ($(SYMBOLS),)
SHARED_LIB := yes
endif
#
# Sanity check to detect missing library description file
# Sanity check to detect missing library-description file
#
ifeq ($(LIB_MK),)
ifeq ($(sort $(LIB_MK) $(SYMBOLS)),)
all: warn_missing_lib_mk
else
all: check_unsatisfied_requirements

View File

@ -64,18 +64,9 @@ include $(foreach LIB,$(LIBS),$(call select_from_repositories,lib/import/import-
#
include $(BASE_DIR)/mk/global.mk
#
# Name of <libname>.lib.a or <libname>.lib.so file to create
#
ifdef SHARED_LIB
LIB_SO := $(addsuffix .lib.so,$(LIB))
INSTALL_SO := $(INSTALL_DIR)/$(LIB_SO)
LIB_FILENAME := $(LIB_SO)
else
LIB_A := $(addsuffix .lib.a,$(LIB))
LIB_FILENAME := $(LIB_A)
ifneq ($(SYMBOLS),)
SHARED_LIB := yes
endif
LIB_TAG := $(addsuffix .lib.tag,$(LIB))
#
# If a symbol list is provided, we create an ABI stub named '<lib>.abi.so'
@ -128,9 +119,27 @@ all: message
message:
$(MSG_LIB)$(LIB)
include $(BASE_DIR)/mk/generic.mk
#
# Name of <libname>.lib.a or <libname>.lib.so file to create
#
# Skip the creation and installation of an .so file if there are no
# ingredients. This is the case if the library is present as ABI only.
#
ifdef SHARED_LIB
ifneq ($(sort $(OBJECTS) $(LIBS)),)
LIB_SO := $(addsuffix .lib.so,$(LIB))
INSTALL_SO := $(INSTALL_DIR)/$(LIB_SO)
endif
else
LIB_A := $(addsuffix .lib.a,$(LIB))
endif
#
# Trigger the creation of the <libname>.lib.a or <libname>.lib.so file
#
LIB_TAG := $(addsuffix .lib.tag,$(LIB))
all: $(LIB_TAG)
#
@ -145,8 +154,6 @@ $(LIB_TAG) $(OBJECTS): $(HOST_TOOLS)
$(LIB_TAG): $(LIB_A) $(LIB_SO) $(ABI_SO) $(INSTALL_SO)
@touch $@
include $(BASE_DIR)/mk/generic.mk
#
# Rust support
#