This allows SYSTEM_SOX=y to be defined in the Makefile to skip building
it locally and use the system library instead.
Default is still to download and statically link against libsox.
---
src/Makefile.linux | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/Makefile.linux b/src/Makefile.linux
index 8cc4e08..fb00370 100644
--- a/src/Makefile.linux
+++ b/src/Makefile.linux
@@ -56,9 +56,15 @@ CODEC2_LIB=$(CODEC2)/src/.libs/libcodec2.a
# Sox ---------------------------------------------------
# (libmagic is rqd or later versions of Ubuntu)
+ifeq ($(SYSTEM_SOX),y)
+SOX_INC ?= $(shell pkg-config sox --cflags)
+SOX_LIB ?= $(shell pkg-config sox --libs)
+else
SOX=sox-14.4.0
SOX_INC=-I$(SOX)/src/
SOX_LIB=$(SOX)/src/.libs/libsox.a
+LIBS_TO_BUILD += $(SOX)/.built
+endif
# CTB ---------------------------------------------------
@@ -88,7 +94,7 @@ codec2-dev/src/golay23.c
HDRS = ../version.h dlg_about.h dlg_audiooptions.h dlg_comports.h dlg_filter.h
fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h
fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h
fdmdv2_pa_wrapper.h topFrame.h varicode.h codec2-dev/src/golay23.h
-all: $(LIBS_TO_BUILD) $(CODEC2)/.built $(SOX)/.built $(CTB)/.built freedv
+all: $(LIBS_TO_BUILD) $(CODEC2)/.built $(CTB)/.built freedv
freedv: $(OBJS)
$(CXX) -o freedv $(OBJS) $(CPP_FLAGS) $(FREEDV_LIBS)
--
1.8.1.2
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2