Jakub Czapiga has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59916 )
Change subject: libpayload: Provide includes for payloads ......................................................................
libpayload: Provide includes for payloads
Provide one, consistent include directory for payloads to use. It includes external header files used in libpayload.
Change-Id: Idc7175240f3077ec98280331f9a952310aae4341 Signed-off-by: Jakub Czapiga jacz@semihalf.com --- M payloads/libpayload/Makefile.inc 1 file changed, 20 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/59916/1
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc index 2332517..56eb84d 100644 --- a/payloads/libpayload/Makefile.inc +++ b/payloads/libpayload/Makefile.inc @@ -71,10 +71,24 @@ CFLAGS += -flto endif
+early-headers-install: + printf " INSTALL $(obj)/libpayload/include\n" + install -m 755 -d "$(obj)/libpayload/include" + install -m 755 -d "$(obj)/libpayload.d/" + for file in `find include -name *.h -type f`; do \ + install -m 755 -d "$(obj)/libpayload/`dirname $$file`"; \ + install -m 644 "$$file" "$(obj)/libpayload/$$file"; \ + done + for file in `find $(coreboottop)/src/commonlib/bsd/include -name *.h -type f`; do \ + dest_file=$$(realpath --relative-to=$(coreboottop)/src/commonlib/bsd/ $$file); \ + install -m 755 -d "$(obj)/libpayload/`dirname $$dest_file`"; \ + install -m 644 "$$file" "$(obj)/libpayload/$$dest_file"; \ + done + $(obj)/libpayload.config: $(DOTCONFIG) cp $< $@
-$(obj)/libpayload-config.h: $(KCONFIG_AUTOHEADER) $(obj)/libpayload.config +$(obj)/libpayload-config.h: $(KCONFIG_AUTOHEADER) $(obj)/libpayload.config early-headers-install cmp $@ $< 2>/dev/null || cp $< $@
library-targets = $(addsuffix .a,$(addprefix $(obj)/,$(libraries))) $(obj)/libpayload.a @@ -116,6 +130,11 @@ install -m 755 -d $(DESTDIR)/libpayload/`dirname $$file`; \ install -m 644 $$file $(DESTDIR)/libpayload/$$file; \ done + for file in `find $(coreboottop)/src/commonlib/bsd/include -name *.h -type f`; do \ + dest_file=$$(realpath --relative-to=$(coreboottop)/src/commonlib/bsd/ $$file); \ + install -m 755 -d "$(DESTDIR)/libpayload/`dirname $$dest_file`"; \ + install -m 644 "$$file" "$(DESTDIR)/libpayload/$$dest_file"; \ + done install -m 644 $(obj)/libpayload-config.h $(DESTDIR)/libpayload/include $(foreach item,$(includes), \ install -m 755 -d $(DESTDIR)/libpayload/include/$(call extract_nth,2,$(item)); \