diff options
author | Martin Roth <martinroth@google.com> | 2016-03-16 10:39:30 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-03-21 04:03:16 +0100 |
commit | c8ed34075b7785c91cfb1c8556357b2e70cf765d (patch) | |
tree | d24ee1926540ac2e9e158d74be93b11623e33610 /payloads/external/GRUB2/Makefile | |
parent | c2b50ace1b04c90c27dae8d5999c14f925b93c65 (diff) |
payloads/external: Rename Makefile.inc to Makefile
These makefiles are not included by anything, so they shouldn't be
named Makefile.inc. Also, having them all be named 'Makefile' makes
some other consolidation work I'm doing much easier.
Change-Id: I1234539ba6a0a6f47d2eb0c21de3da3607c6b8de
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14130
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/external/GRUB2/Makefile')
-rw-r--r-- | payloads/external/GRUB2/Makefile | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/payloads/external/GRUB2/Makefile b/payloads/external/GRUB2/Makefile new file mode 100644 index 0000000000..11630c8469 --- /dev/null +++ b/payloads/external/GRUB2/Makefile @@ -0,0 +1,53 @@ +TAG-$(CONFIG_GRUB2_MASTER)= +NAME-$(CONFIG_GRUB2_MASTER)=HEAD + +unexport KCONFIG_AUTOCONFIG +unexport CFLAGS +unexport CPPFLAGS +unexport CCASFLAGS +unexport CC +unexport BUILD_CC +unexport TARGET_CC +unexport TARGET_CFLAGS +unexport TARGET_CPPFLAGS +unexport TARGET_STRIP +unexport TARGET_OBJCOPY +unexport HOST_CFLAGS +unexport HOST_CPPFLAGS +unexport HOST_CC + + +all: grub2 + +checkout: + echo " GIT GRUB2 $(NAME-y)" + test -d grub2 || \ + git clone git://git.sv.gnu.org/grub.git grub2 + cd grub2 && \ + git checkout master && \ + git pull; \ + test -n "$(TAG-y)" && \ + git branch -f $(NAME-y) $(TAG-y) && \ + git checkout $(NAME-y) || true + +config: checkout + echo " CONFIG GRUB2 $(NAME-y)" + rm -rf grub2/build + mkdir grub2/build + cd grub2 && ./autogen.sh + cd grub2/build && ../configure BUILD_CC="$(HOSTCC)" CC="$(HOSTCC)" \ + TARGET_CC="$(CC)" \ + TARGET_OBJCOPY="$(OBJCOPY)" TARGET_STRIP="$(STRIP)" CFLAGS=-O2 TARGET_CFLAGS=-Os --with-platform=coreboot + +grub2: config + echo " MAKE GRUB2 $(NAME-y)" + $(MAKE) -C grub2/build CC="$(HOSTCC)" + $(MAKE) -C grub2/build default_payload.elf EXTRA_PAYLOAD_MODULES="$(GRUB2_EXTRA_MODULES)" + +clean: + test -d grub2 && $(MAKE) -C grub2 clean || exit 0 + +distclean: + rm -rf grub2 + +.PHONY: checkout config grub2 clean distclean |