summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/Makefile.mk4
-rwxr-xr-xpayloads/libpayload/bin/lpgcc3
-rw-r--r--payloads/libpayload/tests/Makefile.mk1
3 files changed, 8 insertions, 0 deletions
diff --git a/payloads/libpayload/Makefile.mk b/payloads/libpayload/Makefile.mk
index e000868c2b..afaa06dd3d 100644
--- a/payloads/libpayload/Makefile.mk
+++ b/payloads/libpayload/Makefile.mk
@@ -133,6 +133,10 @@ install: real-target
find include -type f -exec install -m644 {} $(DESTDIR)/libpayload/{} \;
cd $(coreboottop)/src/commonlib/bsd && find include -type d -exec install -m755 -d $(abspath $(DESTDIR))/libpayload/{} \;
cd $(coreboottop)/src/commonlib/bsd && find include -type f -exec install -m644 {} $(abspath $(DESTDIR))/libpayload/{} \;
+ifeq ($(CONFIG_LP_GPL),y)
+ cd $(coreboottop)/src/commonlib && find include -type d -exec install -m755 -d $(abspath $(DESTDIR))/libpayload/{} \;
+ cd $(coreboottop)/src/commonlib && find include -type f -exec install -m644 {} $(abspath $(DESTDIR))/libpayload/{} \;
+endif
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)); \
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 35fa5584a8..bdc1518ed3 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -170,6 +170,9 @@ if [ $_LIBDIR = $_OBJ ]; then
_CFLAGS="$_CFLAGS -include $BASE/../../../src/commonlib/bsd/include/commonlib/bsd/compiler.h"
_CFLAGS="$_CFLAGS -I$BASE/../../../src/commonlib/bsd/include"
+ if [ "$CONFIG_LP_GPL" = y ]; then
+ _CFLAGS="$_CFLAGS -I$BASE/../../../src/commonlib/include"
+ fi
_CFLAGS="$_CFLAGS -I$BASE/../../../3rdparty/vboot/firmware/include"
else
_CFLAGS="$_CFLAGS -include $BASE/../include/commonlib/bsd/compiler.h"
diff --git a/payloads/libpayload/tests/Makefile.mk b/payloads/libpayload/tests/Makefile.mk
index 9bac9e6505..7118906850 100644
--- a/payloads/libpayload/tests/Makefile.mk
+++ b/payloads/libpayload/tests/Makefile.mk
@@ -34,6 +34,7 @@ TEST_CFLAGS := -include include/kconfig.h
TEST_CFLAGS += -include $(coreboottop)/src/commonlib/bsd/include/commonlib/bsd/compiler.h
TEST_CFLAGS += -Iinclude -Iinclude/mock
TEST_CFLAGS += -I$(coreboottop)/src/commonlib/bsd/include
+TEST_CFLAGS += -I$(coreboottop)/src/commonlib/include
TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER))
TEST_CFLAGS += -I$(VBOOT_SOURCE)/firmware/include