mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
5ae0dab6c5
This patch removes the implicit build of all shared libraries a target depends on. Targets only depend on the respective ABIs instead. This alleviates the need to locally build complex shared libraries (think of Qt) when developing applications. Instead, application developers can use binary depot archives. The implementation splits the mk/lib.mk file into three files: - mk/a.mk for building one static library (.lib.a) - mk/so.mk for building one shared object (.lib.so) - mk/abi.mk for building one ABI stub (.abi.so) Furthermore, the commit moves messages and the collection of build artifacts to var/libdeps, triggers the build of kernel-specific ld-<kernel>.lib.so, and prunes the lib-dependency tree at ABIs. Fixes #5061
36 lines
966 B
Makefile
36 lines
966 B
Makefile
#
|
|
# The following variables must be defined by the caller:
|
|
#
|
|
# SYMBOLS - path to symbols file
|
|
# LIB_PROGRESS_LOG - record of visited ABIs
|
|
# LIB_DEP_FILE - destination Makefile for ABI-creation rule
|
|
#
|
|
|
|
override LIB := $(notdir $(SYMBOLS))
|
|
|
|
all:
|
|
@true
|
|
|
|
include $(BASE_DIR)/mk/dep.inc
|
|
include $(LIB_PROGRESS_LOG)
|
|
|
|
ifeq ($(filter $(ABIS_READY),$(LIB)),)
|
|
all: generate
|
|
endif
|
|
|
|
log_progress:
|
|
@echo "ABIS_READY += $(LIB)" >> $(LIB_PROGRESS_LOG)
|
|
|
|
generate:
|
|
@(echo "SO_NAME($(LIB)) := $(LIB).lib.so"; \
|
|
echo "$(LIB).lib.a:"; \
|
|
echo " @true"; \
|
|
echo "$(LIB).abi.so:"; \
|
|
echo " \$$(VERBOSE)\$$(call _prepare_lib_step,\$$@,$(LIB),)"; \
|
|
echo " \$$(VERBOSE_MK)\$$(MAKE) \$$(VERBOSE_DIR) -C \$$(LIB_CACHE_DIR)/$(LIB) -f \$$(BASE_DIR)/mk/abi.mk \\"; \
|
|
echo " SYMBOLS=$(SYMBOLS) \\"; \
|
|
echo " LIB=$(LIB) \\"; \
|
|
echo " BUILD_BASE_DIR=$(BUILD_BASE_DIR) \\"; \
|
|
echo " SHELL=$(SHELL)"; \
|
|
echo "") >> $(LIB_DEP_FILE)
|