blob: 296ff05a2cac6a11ec32c87ffa4d608df275b56f [file] [log] [blame]
dburgessb3a0ca42011-10-12 07:44:40 +00001#
2# Copyright 2008 Free Software Foundation, Inc.
3# Copyright 2010 Range Networks, Inc.
4#
5# This software is distributed under the terms of the GNU Public License.
6# See the COPYING file in the main directory for details.
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21
22include $(top_srcdir)/Makefile.common
23
Pau Espin Pedrol2128a302018-04-24 16:16:06 +020024SUBDIRS = arch device
Thomas Tsou3eaae802013-08-20 19:31:14 -040025
Pau Espin Pedrolb5def412019-05-03 21:08:40 +020026AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/arch/common -I${srcdir}/device/common
Pau Espin Pedrol43fedb62018-04-24 15:22:57 +020027AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS)
Pau Espin Pedrol778b30a2019-06-28 13:27:24 +020028AM_CFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS)
Thomas Tsou17bbb9b2013-10-30 21:24:40 -040029
Pau Espin Pedrol2128a302018-04-24 16:16:06 +020030noinst_LTLIBRARIES = libtransceiver_common.la
dburgessb3a0ca42011-10-12 07:44:40 +000031
kurtis.heimerl8aea56e2011-11-26 03:18:30 +000032COMMON_SOURCES = \
dburgessb3a0ca42011-10-12 07:44:40 +000033 radioInterface.cpp \
kurtis.heimerl8aea56e2011-11-26 03:18:30 +000034 radioVector.cpp \
35 radioClock.cpp \
Tom Tsou28670fb2015-08-21 19:32:58 -070036 radioBuffer.cpp \
dburgessb3a0ca42011-10-12 07:44:40 +000037 sigProcLib.cpp \
Thomas Tsou20eb6d62013-11-09 14:30:41 -050038 signalVector.cpp \
Tom Tsou35222292016-06-22 16:16:30 -070039 Transceiver.cpp \
40 ChannelizerBase.cpp \
41 Channelizer.cpp \
Pau Espin Pedrol15fa64b2019-07-01 20:41:55 +020042 Synthesis.cpp \
43 proto_trxd.c
dburgessb3a0ca42011-10-12 07:44:40 +000044
Pau Espin Pedrol2128a302018-04-24 16:16:06 +020045libtransceiver_common_la_SOURCES = \
kurtis.heimerl75336d92011-11-26 03:19:05 +000046 $(COMMON_SOURCES) \
Thomas Tsou03e6ecf2013-08-20 20:54:54 -040047 Resampler.cpp \
Thomas Tsoue90a42b2013-11-13 23:38:09 -050048 radioInterfaceResamp.cpp \
Tom Tsoud6ae8642017-03-30 17:22:58 -070049 radioInterfaceMulti.cpp
kurtis.heimerl8aea56e2011-11-26 03:18:30 +000050
dburgessb3a0ca42011-10-12 07:44:40 +000051noinst_HEADERS = \
52 Complex.h \
53 radioInterface.h \
kurtis.heimerl8aea56e2011-11-26 03:18:30 +000054 radioVector.h \
55 radioClock.h \
Tom Tsou28670fb2015-08-21 19:32:58 -070056 radioBuffer.h \
dburgessb3a0ca42011-10-12 07:44:40 +000057 sigProcLib.h \
Thomas Tsou20eb6d62013-11-09 14:30:41 -050058 signalVector.h \
dburgessb3a0ca42011-10-12 07:44:40 +000059 Transceiver.h \
Thomas Tsou03e6ecf2013-08-20 20:54:54 -040060 Resampler.h \
Tom Tsou35222292016-06-22 16:16:30 -070061 ChannelizerBase.h \
62 Channelizer.h \
Pau Espin Pedrol778b30a2019-06-28 13:27:24 +020063 Synthesis.h \
64 proto_trxd.h
dburgessb3a0ca42011-10-12 07:44:40 +000065
Pau Espin Pedrol2128a302018-04-24 16:16:06 +020066COMMON_LDADD = \
67 libtransceiver_common.la \
Thomas Tsou17bbb9b2013-10-30 21:24:40 -040068 $(ARCH_LA) \
dburgessb3a0ca42011-10-12 07:44:40 +000069 $(GSM_LA) \
Alexander Huemer6fafd332018-01-12 15:04:02 +010070 $(COMMON_LA) \
Pau Espin Pedrol8b843e52018-02-20 14:44:39 +010071 $(FFTWF_LIBS) \
Pau Espin Pedrol5ea18172018-02-20 16:48:15 +010072 $(LIBOSMOCORE_LIBS) \
73 $(LIBOSMOCTRL_LIBS) \
74 $(LIBOSMOVTY_LIBS)
dburgessb3a0ca42011-10-12 07:44:40 +000075
Ericb7253c62022-11-28 19:21:08 +010076if ENABLE_MS_TRX
77AM_CPPFLAGS += -I$(top_srcdir)/osmocom-bb/src/host/trxcon/include/
78AM_CPPFLAGS += -I${srcdir}
79
80TRXCON_LDADD = \
81 $(top_builddir)/osmocom-bb/src/host/trxcon/src/.libs/libtrxcon.a \
82 $(top_builddir)/osmocom-bb/src/host/trxcon/src/.libs/libl1sched.a \
83 $(LIBOSMOCODING_LIBS)
84
85MS_SOURCES = \
86 ms/sch.c \
87 ms/ms.cpp \
88 ms/ms_rx_lower.cpp \
89 grgsm_vitac/grgsm_vitac.cpp \
90 grgsm_vitac/viterbi_detector.cc
91
92noinst_HEADERS += \
93 ms/ms.h \
94 ms/bladerf_specific.h \
95 ms/uhd_specific.h \
96 ms/ms_rx_burst.h \
97 ms/ms_upper.h \
98 ms/itrq.h \
99 ms/sch.h \
Eric3e7f4b02023-05-23 12:50:25 +0200100 ms/threadpool.h \
Ericb7253c62022-11-28 19:21:08 +0100101 grgsm_vitac/viterbi_detector.h \
102 grgsm_vitac/constants.h \
103 grgsm_vitac/grgsm_vitac.h
104
105endif
106
Pau Espin Pedrolf3d7f442018-04-24 18:49:03 +0200107bin_PROGRAMS =
Pau Espin Pedrol2128a302018-04-24 16:16:06 +0200108
Pau Espin Pedrolf3d7f442018-04-24 18:49:03 +0200109if DEVICE_UHD
110bin_PROGRAMS += osmo-trx-uhd
111osmo_trx_uhd_SOURCES = osmo-trx.cpp
112osmo_trx_uhd_LDADD = \
Pau Espin Pedrol2a8183b2018-04-28 00:20:19 +0200113 $(builddir)/device/uhd/libdevice.la \
Pau Espin Pedrol2128a302018-04-24 16:16:06 +0200114 $(COMMON_LDADD) \
Pau Espin Pedrol2a8183b2018-04-28 00:20:19 +0200115 $(UHD_LIBS)
Pau Espin Pedrolf3d7f442018-04-24 18:49:03 +0200116osmo_trx_uhd_CPPFLAGS = $(AM_CPPFLAGS) $(UHD_CFLAGS)
Ericb7253c62022-11-28 19:21:08 +0100117
118if ENABLE_MS_TRX
119bin_PROGRAMS += osmo-trx-ms-uhd
120osmo_trx_ms_uhd_SOURCES = $(MS_SOURCES) ms/ms_upper.cpp ms/l1ctl_server.c ms/logging.c ms/l1ctl_server_cb.cpp
121osmo_trx_ms_uhd_LDADD = \
122 $(builddir)/device/uhd/libdevice.la \
123 $(COMMON_LDADD) \
124 $(UHD_LIBS) \
125 $(TRXCON_LDADD)
126osmo_trx_ms_uhd_CPPFLAGS = $(AM_CPPFLAGS) $(UHD_CFLAGS) -DBUILDUHD
127
128bin_PROGRAMS += osmo-trx-syncthing-uhd
129osmo_trx_syncthing_uhd_SOURCES = $(MS_SOURCES) ms/ms_rx_burst_test.cpp
130osmo_trx_syncthing_uhd_LDADD = \
131 $(builddir)/device/uhd/libdevice.la \
132 $(COMMON_LDADD) \
133 $(UHD_LIBS) \
134 $(TRXCON_LDADD)
135osmo_trx_syncthing_uhd_CPPFLAGS = $(AM_CPPFLAGS) $(UHD_CFLAGS) -DSYNCTHINGONLY -DBUILDUHD
136endif
Pau Espin Pedrolf3d7f442018-04-24 18:49:03 +0200137endif
138
139if DEVICE_USRP1
140bin_PROGRAMS += osmo-trx-usrp1
141osmo_trx_usrp1_SOURCES = osmo-trx.cpp
142osmo_trx_usrp1_LDADD = \
Pau Espin Pedrol2a8183b2018-04-28 00:20:19 +0200143 $(builddir)/device/usrp1/libdevice.la \
Pau Espin Pedrolf3d7f442018-04-24 18:49:03 +0200144 $(COMMON_LDADD) \
Pau Espin Pedrol2a8183b2018-04-28 00:20:19 +0200145 $(USRP_LIBS)
Pau Espin Pedrolf3d7f442018-04-24 18:49:03 +0200146osmo_trx_usrp1_CPPFLAGS = $(AM_CPPFLAGS) $(USRP_CFLAGS)
kurtis.heimerl4ba47182011-11-26 03:19:36 +0000147endif
Pau Espin Pedrol1f50fed2018-04-25 11:12:06 +0200148
149if DEVICE_LMS
150bin_PROGRAMS += osmo-trx-lms
151osmo_trx_lms_SOURCES = osmo-trx.cpp
152osmo_trx_lms_LDADD = \
Pau Espin Pedrolf7905ac2018-05-08 20:29:32 +0200153 $(builddir)/device/lms/libdevice.la \
Pau Espin Pedrol1f50fed2018-04-25 11:12:06 +0200154 $(COMMON_LDADD) \
Pau Espin Pedrolf7905ac2018-05-08 20:29:32 +0200155 $(LMS_LIBS)
Pau Espin Pedrol1f50fed2018-04-25 11:12:06 +0200156osmo_trx_lms_CPPFLAGS = $(AM_CPPFLAGS) $(LMS_CFLAGS)
157endif
Eric Wild1e17c4f2020-03-24 17:19:27 +0100158
Eric7d897cb2022-11-28 19:20:32 +0100159if DEVICE_BLADE
160bin_PROGRAMS += osmo-trx-blade
161osmo_trx_blade_SOURCES = osmo-trx.cpp
162osmo_trx_blade_LDADD = \
163 $(builddir)/device/bladerf/libdevice.la \
164 $(COMMON_LDADD) \
165 $(BLADE_LIBS)
166osmo_trx_blade_CPPFLAGS = $(AM_CPPFLAGS) $(LMS_CFLAGS)
167
Ericb7253c62022-11-28 19:21:08 +0100168if ENABLE_MS_TRX
169bin_PROGRAMS += osmo-trx-ms-blade
170osmo_trx_ms_blade_SOURCES = $(MS_SOURCES) ms/ms_upper.cpp ms/l1ctl_server.c ms/logging.c ms/l1ctl_server_cb.cpp
171osmo_trx_ms_blade_LDADD = \
172 $(builddir)/device/bladerf/libdevice.la \
173 $(COMMON_LDADD) \
174 $(BLADE_LIBS) \
175 $(TRXCON_LDADD)
176osmo_trx_ms_blade_CPPFLAGS = $(AM_CPPFLAGS) $(BLADE_CFLAGS) -DBUILDBLADE
177
178bin_PROGRAMS += osmo-trx-syncthing-blade
179osmo_trx_syncthing_blade_SOURCES = $(MS_SOURCES) ms/ms_rx_burst_test.cpp
180osmo_trx_syncthing_blade_LDADD = \
181 $(builddir)/device/bladerf/libdevice.la \
182 $(COMMON_LDADD) \
183 $(BLADE_LIBS) \
184 $(TRXCON_LDADD)
185osmo_trx_syncthing_blade_CPPFLAGS = $(AM_CPPFLAGS) $(BLADE_CFLAGS) -DSYNCTHINGONLY -DBUILDBLADE -I../device/ipc
186endif
Eric7d897cb2022-11-28 19:20:32 +0100187endif
188
Eric Wild1e17c4f2020-03-24 17:19:27 +0100189if DEVICE_IPC
190bin_PROGRAMS += osmo-trx-ipc
191osmo_trx_ipc_SOURCES = osmo-trx.cpp
192osmo_trx_ipc_LDADD = \
193 $(builddir)/device/ipc/libdevice.la \
194 $(COMMON_LDADD)
195osmo_trx_ipc_CPPFLAGS = $(AM_CPPFLAGS)
196endif