156769ba4SMasahiro Yamada# SPDX-License-Identifier: GPL-2.0-only 256769ba4SMasahiro Yamada# ========================================================================== 356769ba4SMasahiro Yamada# Install unstripped copies of vDSO 456769ba4SMasahiro Yamada# ========================================================================== 556769ba4SMasahiro Yamada 656769ba4SMasahiro YamadaPHONY := __default 756769ba4SMasahiro Yamada__default: 856769ba4SMasahiro Yamada @: 956769ba4SMasahiro Yamada 1056769ba4SMasahiro Yamadainclude $(srctree)/scripts/Kbuild.include 1156769ba4SMasahiro Yamada 1256769ba4SMasahiro Yamadainstall-dir := $(MODLIB)/vdso 1356769ba4SMasahiro Yamada 1456769ba4SMasahiro Yamadadefine gen_install_rules 1556769ba4SMasahiro Yamada 161c369b6cSMasahiro Yamadadest := $(install-dir)/$$(patsubst %.dbg,%,$$(notdir $(1))) 1756769ba4SMasahiro Yamada 1856769ba4SMasahiro Yamada__default: $$(dest) 191c369b6cSMasahiro Yamada$$(dest): $(1) FORCE 2056769ba4SMasahiro Yamada $$(call cmd,install) 2156769ba4SMasahiro Yamada 2256769ba4SMasahiro Yamada# Some architectures create .build-id symlinks 23*fc2f5f10SJens Remusifneq ($(filter arm s390 sparc x86, $(SRCARCH)),) 241c369b6cSMasahiro Yamadalink := $(install-dir)/.build-id/$$(shell $(READELF) -n $(1) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug 2556769ba4SMasahiro Yamada 2656769ba4SMasahiro Yamada__default: $$(link) 2756769ba4SMasahiro Yamada$$(link): $$(dest) FORCE 2856769ba4SMasahiro Yamada $$(call cmd,symlink) 2956769ba4SMasahiro Yamadaendif 3056769ba4SMasahiro Yamada 3156769ba4SMasahiro Yamadaendef 3256769ba4SMasahiro Yamada 3356769ba4SMasahiro Yamada$(foreach x, $(sort $(INSTALL_FILES)), $(eval $(call gen_install_rules,$(x)))) 3456769ba4SMasahiro Yamada 3556769ba4SMasahiro Yamadaquiet_cmd_install = INSTALL $@ 3656769ba4SMasahiro Yamada cmd_install = mkdir -p $(dir $@); cp $< $@ 3756769ba4SMasahiro Yamada 3856769ba4SMasahiro Yamadaquiet_cmd_symlink = SYMLINK $@ 3956769ba4SMasahiro Yamada cmd_symlink = mkdir -p $(dir $@); ln -sf --relative $< $@ 4056769ba4SMasahiro Yamada 4156769ba4SMasahiro YamadaPHONY += FORCE 4256769ba4SMasahiro YamadaFORCE: 4356769ba4SMasahiro Yamada 4456769ba4SMasahiro Yamada.PHONY: $(PHONY) 45