aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-11-16 21:13:28 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-11-25 19:25:10 +0100
commit9776736cc4cc678f7aa2d0b9ebee65455bce9ce9 (patch)
treeddd97bd1149c3122902dffa8cce1c6e8975dadd8
parent083ea4edaab0ea5b0c9c2aedd1483be4ec97bc5b (diff)
Restructure: Move compandor from common code to 'libcompandor'
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am2
-rw-r--r--src/amps/Makefile.am1
-rw-r--r--src/amps/amps.h2
-rw-r--r--src/cnetz/Makefile.am1
-rw-r--r--src/cnetz/cnetz.h2
-rw-r--r--src/common/Makefile.am1
-rw-r--r--src/jtacs/Makefile.am1
-rw-r--r--src/libcompandor/Makefile.am6
-rw-r--r--src/libcompandor/compandor.c (renamed from src/common/compandor.c)2
-rw-r--r--src/libcompandor/compandor.h (renamed from src/common/compandor.h)1
-rw-r--r--src/nmt/Makefile.am1
-rw-r--r--src/nmt/nmt.h2
-rw-r--r--src/r2000/Makefile.am1
-rw-r--r--src/r2000/r2000.h2
-rw-r--r--src/tacs/Makefile.am1
-rw-r--r--src/test/Makefile.am1
-rw-r--r--src/test/test_compandor.c2
19 files changed, 23 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 5ebf7c6..b570c2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@ compile
.libs
.dirstamp
m4
+src/libcompandor/libcompandor.a
src/libgoertzel/libgoertzel.a
src/libjitter/libjitter.a
src/libsquelch/libsquelch.a
diff --git a/configure.ac b/configure.ac
index 9d57e85..1b9a604 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,6 +75,7 @@ AS_IF([test "x$with_soapy" == "xyes"],[AC_MSG_NOTICE( Compiling with SoapySDR su
AS_IF([test "x$somethingmagick" == "xyes"],[AC_MSG_NOTICE( Compiling with ImageMagick )],[AC_MSG_NOTICE( ImageMagick not supported )])
AC_OUTPUT(
+ src/libcompandor/Makefile
src/libgoertzel/Makefile
src/libjitter/Makefile
src/libsquelch/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index e9cde59..f14df22 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,3 @@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = libgoertzel libjitter libsquelch libhagelbarger libdtmf libtimer libsamplerate libscrambler libemphasis libfsk libfm libfilter libwave libfft common anetz bnetz cnetz nmt amps tacs jtacs r2000 tv test
+SUBDIRS = libcompandor libgoertzel libjitter libsquelch libhagelbarger libdtmf libtimer libsamplerate libscrambler libemphasis libfsk libfm libfilter libwave libfft common anetz bnetz cnetz nmt amps tacs jtacs r2000 tv test
diff --git a/src/amps/Makefile.am b/src/amps/Makefile.am
index 3990e9a..a3b40b7 100644
--- a/src/amps/Makefile.am
+++ b/src/amps/Makefile.am
@@ -26,6 +26,7 @@ amps_SOURCES = \
amps_LDADD = \
$(COMMON_LA) \
libamps.a \
+ $(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/common/libmobile.a \
diff --git a/src/amps/amps.h b/src/amps/amps.h
index 232745a..445675e 100644
--- a/src/amps/amps.h
+++ b/src/amps/amps.h
@@ -1,7 +1,7 @@
#include "../libgoertzel/goertzel.h"
#include "../common/sender.h"
#include "../libtimer/timer.h"
-#include "../common/compandor.h"
+#include "../libcompandor/compandor.h"
#include "sysinfo.h"
#include "transaction.h"
diff --git a/src/cnetz/Makefile.am b/src/cnetz/Makefile.am
index 8962b94..5d2cf2f 100644
--- a/src/cnetz/Makefile.am
+++ b/src/cnetz/Makefile.am
@@ -17,6 +17,7 @@ cnetz_SOURCES = \
cnetz_LDADD = \
$(COMMON_LA) \
../anetz/libgermanton.a \
+ $(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
diff --git a/src/cnetz/cnetz.h b/src/cnetz/cnetz.h
index 8a8c73c..55b5d2b 100644
--- a/src/cnetz/cnetz.h
+++ b/src/cnetz/cnetz.h
@@ -1,4 +1,4 @@
-#include "../common/compandor.h"
+#include "../libcompandor/compandor.h"
#include "../libtimer/timer.h"
#include "../common/sender.h"
#include "fsk_demod.h"
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index adabe55..3af2a7d 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -6,7 +6,6 @@ libcommon_a_SOURCES = \
sample.c \
debug.c \
sound_alsa.c \
- compandor.c \
display_wave.c \
display_measurements.c
diff --git a/src/jtacs/Makefile.am b/src/jtacs/Makefile.am
index 15a657b..1128133 100644
--- a/src/jtacs/Makefile.am
+++ b/src/jtacs/Makefile.am
@@ -12,6 +12,7 @@ jtacs_SOURCES = \
jtacs_LDADD = \
$(COMMON_LA) \
../amps/libamps.a \
+ $(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/common/libmobile.a \
diff --git a/src/libcompandor/Makefile.am b/src/libcompandor/Makefile.am
new file mode 100644
index 0000000..4c70a7e
--- /dev/null
+++ b/src/libcompandor/Makefile.am
@@ -0,0 +1,6 @@
+AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+
+noinst_LIBRARIES = libcompandor.a
+
+libcompandor_a_SOURCES = \
+ compandor.c
diff --git a/src/common/compandor.c b/src/libcompandor/compandor.c
index aea20cd..c2a326c 100644
--- a/src/common/compandor.c
+++ b/src/libcompandor/compandor.c
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <string.h>
#include <math.h>
-#include "sample.h"
+#include "../common/sample.h"
#include "compandor.h"
//#define db2level(db) pow(10, (double)db / 20.0)
diff --git a/src/common/compandor.h b/src/libcompandor/compandor.h
index cc53ad8..25d51ea 100644
--- a/src/common/compandor.h
+++ b/src/libcompandor/compandor.h
@@ -1,3 +1,4 @@
+
typedef struct compandor {
struct {
double unaffected;
diff --git a/src/nmt/Makefile.am b/src/nmt/Makefile.am
index 545cb27..6429c77 100644
--- a/src/nmt/Makefile.am
+++ b/src/nmt/Makefile.am
@@ -22,6 +22,7 @@ nmt_SOURCES = \
nmt_LDADD = \
$(COMMON_LA) \
libdmssms.a \
+ $(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libhagelbarger/libhagelbarger.a \
diff --git a/src/nmt/nmt.h b/src/nmt/nmt.h
index 3564a73..5179fb2 100644
--- a/src/nmt/nmt.h
+++ b/src/nmt/nmt.h
@@ -1,6 +1,6 @@
#include "../common/sender.h"
#include "../libtimer/timer.h"
-#include "../common/compandor.h"
+#include "../libcompandor/compandor.h"
#include "../libdtmf/dtmf_encode.h"
#include "../common/call.h"
#include "../libfsk/fsk.h"
diff --git a/src/r2000/Makefile.am b/src/r2000/Makefile.am
index 1c763c4..7a8b61b 100644
--- a/src/r2000/Makefile.am
+++ b/src/r2000/Makefile.am
@@ -12,6 +12,7 @@ radiocom2000_SOURCES = \
main.c
radiocom2000_LDADD = \
$(COMMON_LA) \
+ $(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libhagelbarger/libhagelbarger.a \
$(top_builddir)/src/common/libmobile.a \
diff --git a/src/r2000/r2000.h b/src/r2000/r2000.h
index c9012ea..553258b 100644
--- a/src/r2000/r2000.h
+++ b/src/r2000/r2000.h
@@ -1,4 +1,4 @@
-#include "../common/compandor.h"
+#include "../libcompandor/compandor.h"
#include "../libtimer/timer.h"
#include "../common/sender.h"
#include "../common/call.h"
diff --git a/src/tacs/Makefile.am b/src/tacs/Makefile.am
index 7f3afbf..2bca149 100644
--- a/src/tacs/Makefile.am
+++ b/src/tacs/Makefile.am
@@ -13,6 +13,7 @@ tacs_SOURCES = \
tacs_LDADD = \
$(COMMON_LA) \
../amps/libamps.a \
+ $(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/common/libmobile.a \
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 24666bb..6e86ce7 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -32,6 +32,7 @@ test_compandor_SOURCES = dummy.x test_compandor.c
test_compandor_LDADD = \
$(COMMON_LA) \
+ $(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(ALSA_LIBS) \
diff --git a/src/test/test_compandor.c b/src/test/test_compandor.c
index 4b0ff7b..d222928 100644
--- a/src/test/test_compandor.c
+++ b/src/test/test_compandor.c
@@ -3,7 +3,7 @@
#include <math.h>
#include <string.h>
#include "../common/sample.h"
-#include "../common/compandor.h"
+#include "../libcompandor/compandor.h"
#define level2db(level) (20 * log10(level))
#define db2level(db) pow(10, (double)db / 20.0)