drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / payloads / external / U-Boot / Makefile
blobea850b31eeacad3988848ffb5514047c15b8c870
1 ## SPDX-License-Identifier: GPL-2.0-only
3 TAG-$(CONFIG_UBOOT_MASTER)=master
4 TAG-$(CONFIG_UBOOT_STABLE)=$(STABLE_COMMIT_ID)
6 project_name=U-Boot
7 project_dir=u-boot
8 project_git_repo=http://github.com/u-boot/u-boot/
9 project_build_dir=build
10 project_config_file=$(project_build_dir)/.config
12 make_args=-C $(project_dir) O=../build
14 unexport KCONFIG_AUTOHEADER
15 unexport KCONFIG_AUTOCONFIG
16 unexport KCONFIG_DEPENDENCIES
17 unexport KCONFIG_SPLITCONFIG
18 unexport KCONFIG_TRISTATE
19 unexport KCONFIG_NEGATIVES
20 unexport $(COREBOOT_EXPORTS)
22 all: build
24 $(project_dir):
25 echo " Cloning $(project_name) from Git"
26 git clone $(project_git_repo) -b $(TAG-y) $(project_dir)
28 fetch: $(project_dir)
29 ifeq ($(CONFIG_UBOOT_MASTER),y)
30 echo " Fetching new commits from the $(project_name) git repo"
31 git fetch
33 #master doesn't get a file, so it's continuously updated
34 rm -f $(STABLE_COMMIT_ID)
35 else
36 cd $(project_dir); git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ]; \
37 then echo " Fetching new commits from the $(project_name) git repo"; git fetch; fi
38 touch $(STABLE_COMMIT_ID)
39 endif
41 checkout: fetch
42 echo " Checking out $(project_name) revision $(TAG-y)"
43 cd $(project_dir); git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
45 config: checkout
46 mkdir -p $(project_build_dir)
47 rm -f $(project_config_file)
48 ifneq ($(CONFIG_PAYLOAD_CONFIGFILE),)
49 ifneq ("$(wildcard $(CONFIG_PAYLOAD_CONFIGFILE))","")
50 cat $(CONFIG_PAYLOAD_CONFIGFILE)" > tag-$(project_config_file)
51 $(MAKE) $(make_args) olddefconfig
52 else
53 echo "Error: File $(CONFIG_PAYLOAD_CONFIGFILE) does not exist"
54 false
55 endif
56 else
57 $(MAKE) $(make_args) coreboot_defconfig
58 endif
60 build: config
61 echo " MAKE $(project_name) $(TAG-y)"
62 $(MAKE) $(make_args)
64 clean:
65 test -d $(project_dir) && $(MAKE) $(make_args) clean || exit 0
67 distclean:
68 rm -rf $(project_dir)
70 print-repo-info:
71 echo "$(project_git_repo) $(project_dir)"
73 .PHONY: checkout config build clean distclean fetch print-repo-info