summaryrefslogtreecommitdiffstats
path: root/payloads/nvramcui
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-11-15 19:32:12 +0100
committerNico Huber <nico.h@gmx.de>2021-02-07 16:23:33 +0000
commitdd11bf9fe391ef9d3ebe815af45bbad0ba6ceddc (patch)
tree36f9e365d1cd8a0c538d2d35c45f1c03c6a5a153 /payloads/nvramcui
parent552163ef795929c174c0c75454d69af4d79cffbe (diff)
downloadcoreboot-dd11bf9fe391ef9d3ebe815af45bbad0ba6ceddc.tar.gz
coreboot-dd11bf9fe391ef9d3ebe815af45bbad0ba6ceddc.tar.bz2
coreboot-dd11bf9fe391ef9d3ebe815af45bbad0ba6ceddc.zip
nvramcui: Use libpayload's new `Makefile.payload`
Change-Id: I34bf659c1a069ccc27ca613bbf86780d4da49259 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47636 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/nvramcui')
-rw-r--r--payloads/nvramcui/.gitignore2
-rw-r--r--payloads/nvramcui/Makefile37
2 files changed, 8 insertions, 31 deletions
diff --git a/payloads/nvramcui/.gitignore b/payloads/nvramcui/.gitignore
index 4885853d42a5..19a985b1858b 100644
--- a/payloads/nvramcui/.gitignore
+++ b/payloads/nvramcui/.gitignore
@@ -1,2 +1,2 @@
-build
libpayload
+.lp.config*
diff --git a/payloads/nvramcui/Makefile b/payloads/nvramcui/Makefile
index ebc48de8b390..cfe279bb5439 100644
--- a/payloads/nvramcui/Makefile
+++ b/payloads/nvramcui/Makefile
@@ -1,36 +1,13 @@
unexport $(COREBOOT_EXPORTS)
-LIBPAYLOAD_DIR=$(CURDIR)/libpayload
-XCOMPILE=$(LIBPAYLOAD_DIR)/libpayload.xcompile
-# build libpayload and put .config file in $(CURDIR) instead of ../libpayload
-# to avoid pollute the libpayload source directory and possible conflicts
-LPOPTS=obj="$(CURDIR)/build" DESTDIR="$(CURDIR)" DOTCONFIG="$(CURDIR)/.config"
-CFLAGS += -Wall -Wvla -Werror -Os -ffreestanding -nostdinc -nostdlib
+ARCH = x86_32
+OBJS = $(obj)/nvramcui.o
+TARGET = $(obj)/nvramcui.elf
-all: nvramcui.elf
+all: real-all
-$(LIBPAYLOAD_DIR):
- $(MAKE) -C ../libpayload $(LPOPTS) defconfig
- $(MAKE) -C ../libpayload $(LPOPTS)
- $(MAKE) -C ../libpayload $(LPOPTS) install
+include ../libpayload/Makefile.payload
-ifneq ($(strip $(wildcard libpayload)),)
-include $(XCOMPILE)
-LPGCC = CC="$(GCC_CC_x86_32)" "$(LIBPAYLOAD_DIR)/bin/lpgcc"
-%.elf: %.c Makefile
- $(LPGCC) $(CFLAGS) -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_DIR)
- $(MAKE) all
-endif
+real-all: $(TARGET)
-clean:
- rm -rf build libpayload nvramcui.elf
-
-distclean: clean
- rm -rf .config .config.old
-
-.PHONY: all clean distclean
+.PHONY: all real-all