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@xxxxxxxxxxxxxx> --- 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 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox