Linux Audio

Check our new training course

Loading...
v6.13.7
 1# SPDX-License-Identifier: GPL-2.0-only
 2# ==========================================================================
 3# Install unstripped copies of vDSO
 4# ==========================================================================
 5
 6PHONY := __default
 7__default:
 8	@:
 9
10include $(srctree)/scripts/Kbuild.include
11
12install-dir := $(MODLIB)/vdso
13
14define gen_install_rules
15
16dest := $(install-dir)/$$(patsubst %.dbg,%,$$(notdir $(1)))
 
17
18__default: $$(dest)
19$$(dest): $(1) FORCE
20	$$(call cmd,install)
21
22# Some architectures create .build-id symlinks
23ifneq ($(filter arm s390 sparc x86, $(SRCARCH)),)
24link := $(install-dir)/.build-id/$$(shell $(READELF) -n $(1) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug
25
26__default: $$(link)
27$$(link): $$(dest) FORCE
28	$$(call cmd,symlink)
29endif
30
31endef
32
33$(foreach x, $(sort $(INSTALL_FILES)), $(eval $(call gen_install_rules,$(x))))
34
35quiet_cmd_install = INSTALL $@
36      cmd_install = mkdir -p $(dir $@); cp $< $@
37
38quiet_cmd_symlink = SYMLINK $@
39      cmd_symlink = mkdir -p $(dir $@); ln -sf --relative $< $@
40
41PHONY += FORCE
42FORCE:
43
44.PHONY: $(PHONY)
v6.9.4
 1# SPDX-License-Identifier: GPL-2.0-only
 2# ==========================================================================
 3# Install unstripped copies of vDSO
 4# ==========================================================================
 5
 6PHONY := __default
 7__default:
 8	@:
 9
10include $(srctree)/scripts/Kbuild.include
11
12install-dir := $(MODLIB)/vdso
13
14define gen_install_rules
15
16src := $$(firstword $$(subst :,$(space),$(1)))
17dest := $(install-dir)/$$(or $$(word 2,$$(subst :,$(space),$(1))),$$(patsubst %.dbg,%,$$(notdir $(1))))
18
19__default: $$(dest)
20$$(dest): $$(src) FORCE
21	$$(call cmd,install)
22
23# Some architectures create .build-id symlinks
24ifneq ($(filter arm s390 sparc x86, $(SRCARCH)),)
25link := $(install-dir)/.build-id/$$(shell $(READELF) -n $$(src) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug
26
27__default: $$(link)
28$$(link): $$(dest) FORCE
29	$$(call cmd,symlink)
30endif
31
32endef
33
34$(foreach x, $(sort $(INSTALL_FILES)), $(eval $(call gen_install_rules,$(x))))
35
36quiet_cmd_install = INSTALL $@
37      cmd_install = mkdir -p $(dir $@); cp $< $@
38
39quiet_cmd_symlink = SYMLINK $@
40      cmd_symlink = mkdir -p $(dir $@); ln -sf --relative $< $@
41
42PHONY += FORCE
43FORCE:
44
45.PHONY: $(PHONY)