genode/repos/base/lib/mk/ld.mk
Norman Feske 5ae0dab6c5 mk: remove implicit build of shared libraries
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
2023-11-28 14:44:29 +01:00

22 lines
931 B
Makefile

#
# Generic ld.lib.so ABI stub library
#
# The ABI of this library is used to build kernel-independent dynamically
# linked executables. The library does not contain any code or data but only
# the symbol information of the binary interface of the Genode API.
#
# Note that this library is not used as runtime at all. At system-integration
# time, it is transparently replaced by the variant of the dynamic linker that
# matches the used kernel.
#
# By adding a LIB dependency from the kernel-specific dynamic linker, we
# let dep_lib.mk generate the rule for ld-<KERNEL>.so into the var/libdeps
# file. The build of the ld-<KERNEL>.so is triggered because the top-level
# Makefile manually adds the dependency 'ld.so: ld-<KERNEL>.so' to the
# var/libdeps file for the currently selected kernel.
#
LIBS += $(addprefix ld-,$(KERNEL))
# as the stub libarary is not used at runtime, disregard it as build artifact
BUILD_ARTIFACTS :=