[Sound-open-firmware] [PATCH v2] dma-trace: add build condition for dma trace

Keyon Jie yang.jie at linux.intel.com
Fri Dec 22 16:10:56 CET 2017


Only compile dma-trace.c when BUILD_DMA_TRACE is true.

Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
Acked-by: Yan Wang <yan.wang at 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) \
-- 
2.11.0



More information about the Sound-open-firmware mailing list