Revert "Bluetooth: Store advertising handle so it can be re-enabled"
[platform/kernel/linux-rpi.git] / scripts / Makefile.dtbinst
1 # SPDX-License-Identifier: GPL-2.0
2 # ==========================================================================
3 # Installing dtb files
4 #
5 # Installs all dtb files listed in $(dtb-y) either in the
6 # INSTALL_DTBS_PATH directory or the default location:
7 #
8 #   $INSTALL_PATH/dtbs/$KERNELRELEASE
9 # ==========================================================================
10
11 src := $(obj)
12
13 PHONY := __dtbs_install
14 __dtbs_install:
15
16 include include/config/auto.conf
17 include $(srctree)/scripts/Kbuild.include
18 include $(kbuild-file)
19
20 dtbs    := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
21 dtbos   := $(addprefix $(dst)/, $(dtbo-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
22 subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
23
24 __dtbs_install: $(dtbs) $(dtbos) $(subdirs)
25         @:
26
27 quiet_cmd_dtb_install = INSTALL $@
28       cmd_dtb_install = install -D $< $@
29
30 $(dst)/%.dtb: $(obj)/%.dtb
31         $(call cmd,dtb_install)
32
33 $(dst)/%.dtbo: $(obj)/%.dtbo
34         $(call cmd,dtb_install)
35
36 PHONY += $(subdirs)
37 $(subdirs):
38         $(Q)$(MAKE) $(dtbinst)=$@ dst=$(if $(if $(subst $(obj)/overlays,,$@),$(CONFIG_ARCH_WANT_FLAT_DTB_INSTALL),),$(dst),$(patsubst $(obj)/%,$(dst)/%,$@))
39
40 .PHONY: $(PHONY)