Review at  https://gerrit.osmocom.org/7148

Build Transceiver52M/common as an .la lib

Stop picking files from that directory on different places as it causes
dependency issues during make distclean/maintainer-clean.

Fixes: OS#3029

Change-Id: I81bb4251d18fce978d27849b621b20f541caab0b
---
M Transceiver52M/Makefile.am
M Transceiver52M/arm/Makefile.am
A Transceiver52M/common/Makefile.am
M Transceiver52M/x86/Makefile.am
M configure.ac
5 files changed, 25 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/48/7148/1

diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am
index 187a335..9424b8e 100644
--- a/Transceiver52M/Makefile.am
+++ b/Transceiver52M/Makefile.am
@@ -24,10 +24,11 @@
 AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/common
 AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) 
$(LIBOSMOVTY_CFLAGS)
 
+SUBDIRS = common
 if ARCH_ARM
-SUBDIRS = arm
+SUBDIRS += arm
 else
-SUBDIRS = x86
+SUBDIRS += x86
 endif
 
 if USRP1
@@ -58,8 +59,7 @@
        Transceiver.cpp \
        ChannelizerBase.cpp \
        Channelizer.cpp \
-       Synthesis.cpp \
-       common/fft.c
+       Synthesis.cpp
 
 libtransceiver_la_SOURCES = \
        $(COMMON_SOURCES) \
@@ -83,12 +83,7 @@
        Resampler.h \
        ChannelizerBase.h \
        Channelizer.h \
-       Synthesis.h \
-       common/convolve.h \
-       common/convert.h \
-       common/scale.h \
-       common/mult.h \
-       common/fft.h
+       Synthesis.h
 
 osmo_trx_SOURCES = osmo-trx.cpp
 osmo_trx_LDADD = \
diff --git a/Transceiver52M/arm/Makefile.am b/Transceiver52M/arm/Makefile.am
index 6b0b992..11098c6 100644
--- a/Transceiver52M/arm/Makefile.am
+++ b/Transceiver52M/arm/Makefile.am
@@ -9,8 +9,9 @@
 
 noinst_LTLIBRARIES = libarch.la
 
+libarch_la_LIBADD = ../common/libarch_common.la
+
 libarch_la_SOURCES = \
-       ../common/convolve_base.c \
        convert.c \
        convert_neon.S \
        convolve.c \
diff --git a/Transceiver52M/common/Makefile.am 
b/Transceiver52M/common/Makefile.am
new file mode 100644
index 0000000..e8b8f44
--- /dev/null
+++ b/Transceiver52M/common/Makefile.am
@@ -0,0 +1,16 @@
+AM_CFLAGS = -Wall -std=gnu99
+
+noinst_LTLIBRARIES = libarch_common.la
+libarch_common_la_LIBADD =
+
+noinst_HEADERS = \
+        convolve.h \
+        convert.h \
+        scale.h \
+        mult.h \
+        fft.h
+
+libarch_common_la_SOURCES = \
+        convolve_base.c \
+        convert_base.c \
+        fft.c
diff --git a/Transceiver52M/x86/Makefile.am b/Transceiver52M/x86/Makefile.am
index 5d84f85..a87bd04 100644
--- a/Transceiver52M/x86/Makefile.am
+++ b/Transceiver52M/x86/Makefile.am
@@ -4,7 +4,7 @@
 noinst_LTLIBRARIES += libarch_sse_3.la
 noinst_LTLIBRARIES += libarch_sse_4_1.la
 
-libarch_la_LIBADD =
+libarch_la_LIBADD = ../common/libarch_common.la
 
 # SSE 3 specific code
 if HAVE_SSE3
@@ -24,7 +24,5 @@
 endif
 
 libarch_la_SOURCES = \
-       ../common/convolve_base.c \
-       ../common/convert_base.c \
        convert.c \
        convolve.c
diff --git a/configure.ac b/configure.ac
index 916cf18..bade799 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,6 +182,7 @@
     CommonLibs/Makefile \
     GSM/Makefile \
     Transceiver52M/Makefile \
+    Transceiver52M/common/Makefile \
     Transceiver52M/arm/Makefile \
     Transceiver52M/x86/Makefile \
     tests/Makefile \

-- 
To view, visit https://gerrit.osmocom.org/7148
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81bb4251d18fce978d27849b621b20f541caab0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>

Reply via email to