Only compile dma-trace.c when BUILD_DMA_TRACE is true.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com Acked-by: Yan Wang yan.wang@linux.intel.com --- configure.ac | 2 ++ src/lib/Makefile.am | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac index 86d19cb..44ede24 100644 --- a/configure.ac +++ b/configure.ac @@ -132,6 +132,8 @@ AS_IF([test "x$enable_dma_trace" != "xno"], [ AC_DEFINE([CONFIG_DMA_TRACE], [1], [Configure DMA trace]) ])
+AM_CONDITIONAL(BUILD_DMA_TRACE, test "x$enable_dma_trace" != "xno") + # Test after CFLAGS set othewise test of cross compiler fails. AM_PROG_AS AM_PROG_AR diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 5a6dfbf..0a566d0 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -6,10 +6,14 @@ libcore_a_SOURCES = \ work.c \ notifier.c \ trace.c \ - dma-trace.c \ schedule.c \ agent.c
+if BUILD_DMA_TRACE +libcore_a_SOURCES += \ + dma-trace.c +endif + libcore_a_CFLAGS = \ $(ARCH_CFLAGS) \ $(ARCH_INCDIR) \