.lds.S files are linker script files that use the C preprocessor in order
to generate the final .lds file. This commit provides Unikraft's common
declarations of `__LIBNAME__`, `__BASENAME__`, `__VARIANT__` to this
pre-processing step so that they can be used for generating linker scripts.
Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Delia Pavel <delia_maria.pavel@stud.acs.upb.ro>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #868
$$(ASFLAGS) $$(ASFLAGS-y) $$(ASFLAGS_EXTRA) \
$$($(call vprefix_lib,$(1),ASFLAGS)) $$($(call vprefix_lib,$(1),ASFLAGS-y)) \
$$($(call vprefix_src,$(1),$(2),$(3),FLAGS)) $$($(call vprefix_src,$(1),$(2),$(3),FLAGS-y)) \
+ -D__LIBNAME__=$(1) -D__BASENAME__=$(notdir $(2)) $(if $(3),-D__VARIANT__=$(3)) \
$(5) \
$(2) -o $(4) $(call depflags,$(4))
)