[coreboot-gerrit] New patch to review for coreboot: nvramcui: Update Makefile
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Sun Apr 24 01:33:42 CEST 2016
Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14482
-gerrit
commit bd3383e8b6cda295971525ce5b98c7cce48d873f
Author: Martin Roth <martinroth at google.com>
Date: Sat Apr 23 17:19:41 2016 -0600
nvramcui: Update Makefile
- Add clean and distclean to .PHONY
- Rebuild All when the makefile changes.
- Update libpayload target to $(LIBPAYLOAD_DIR) target - these are the
same thing, but by using the variable it makes it more obvious.
- Remove .config.old as well as .config when running distclean.
- Add -fno-builtin to the LPGCC command line to fix the warning:
libpayload.h: warning: conflicting types for built-in function 'log2'
static inline int log2(u32 x) { return sizeof(x) * 8 - clz(x) - 1; }
Change-Id: Icc6c70b259cd7c22dc960cdb732927f9c0c93ee8
Signed-off-by: Martin Roth <martinroth at google.com>
---
payloads/nvramcui/Makefile | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/payloads/nvramcui/Makefile b/payloads/nvramcui/Makefile
index 0f27ff8..397343c 100755
--- a/payloads/nvramcui/Makefile
+++ b/payloads/nvramcui/Makefile
@@ -4,9 +4,9 @@ XCOMPILE=$(LIBPAYLOAD_DIR)/libpayload.xcompile
# to avoid pollute the libpayload source directory and possible conflicts
LPOPTS=obj="$(CURDIR)/build" DESTDIR="$(CURDIR)" DOTCONFIG="$(CURDIR)/.config"
-all: nvramcui.elf
+all: Makefile nvramcui.elf
-libpayload:
+$(LIBPAYLOAD_DIR):
$(MAKE) -C ../libpayload $(LPOPTS) defconfig
$(MAKE) -C ../libpayload $(LPOPTS)
$(MAKE) -C ../libpayload $(LPOPTS) install
@@ -15,18 +15,19 @@ ifneq ($(strip $(wildcard libpayload)),)
include $(XCOMPILE)
LPGCC = CC="$(GCC_CC_x86_32)" "$(LIBPAYLOAD_DIR)/bin/lpgcc"
%.elf: %.c
- $(LPGCC) -o $*.elf $*.c
+ $(LPGCC) -fno-builtin -o $*.elf $*.c
else
# If libpayload is not found, first build libpayload,
# then do the make, this time it'll find libpayload
# and generate the nvramcui.elf target
-%.elf: libpayload
+%.elf: $(LIBPAYLOAD_DIR)
$(MAKE) all
endif
-.PHONY:
clean:
rm -f nvramcui.elf
distclean: clean
- rm -rf build libpayload .config
+ rm -rf build libpayload .config .config.old
+
+.PHONY: clean distclean
More information about the coreboot-gerrit
mailing list