[PATCH 3/7] scripts: Add scripts/include/ to include path for target programs
Sascha Hauer
s.hauer at pengutronix.de
Tue Mar 29 01:50:50 PDT 2016
Programs compiled for the target need -I $(srctree)/scripts/include/ to
be able to include for example linux/err.h.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
scripts/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/Makefile b/scripts/Makefile
index aeedcac..a5c16b2 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -45,12 +45,13 @@ targetprogs-$(CONFIG_IMD_TARGET) += bareboximd-target
subdir- += basic kconfig setupmbr
quiet_cmd_csingle = CC $@
- cmd_csingle = $(CC) -Wp,-MD,$(depfile) $(CFLAGS) -o $@ $<
+ cmd_csingle = $(CC) -Wp,-MD,$(depfile) $(TARGETCFLAGS) $(CFLAGS) -o $@ $<
__targetprogs := $(sort $(targetprogs-y) $(targetprogs-m))
target-csingle := $(foreach m,$(__targetprogs),$(if $($(m)-objs),,$(m)))
__targetprogs := $(addprefix $(obj)/,$(__targetprogs))
target-csingle := $(addprefix $(obj)/,$(target-csingle))
+TARGETCFLAGS += -I$(srctree)/scripts/include/
always := $(hostprogs-y) $(hostprogs-m) $(targetprogs-y)
--
2.7.0
More information about the barebox
mailing list