diff --git a/lib/DtTerm/util/Makefile.am b/lib/DtTerm/util/Makefile.am index 26ae7e11..5b95c66a 100644 --- a/lib/DtTerm/util/Makefile.am +++ b/lib/DtTerm/util/Makefile.am @@ -2,6 +2,15 @@ MAINTAINERCLEANFILES = Makefile.in noinst_PROGRAMS = lineToData +# lineToData is a build tool: Term/Makefile.am runs it while building and it +# must therefore run on the build host, not on the target. automake has no +# per-target CC override, so replace the generated variables for this sub-make; +# the top Makefile.am forwards the *_FOR_BUILD values (same as util/tradcpp). +CC = $(CC_FOR_BUILD) +CPPFLAGS = $(CPPFLAGS_FOR_BUILD) +CFLAGS = $(CFLAGS_FOR_BUILD) +LDFLAGS = $(LDFLAGS_FOR_BUILD) + lineToData_CFLAGS = -I../TermPrim lineToData_SOURCES = lineToData.c