blob: 723ecce855c5143ee097d32f32cce3a0c4b98332 [file] [log] [blame]
piotr437f5462014-02-04 17:57:25 +01001# Copyright 2011,2012 Free Software Foundation, Inc.
2#
3# This file is part of GNU Radio
4#
5# GNU Radio is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3, or (at your option)
8# any later version.
9#
10# GNU Radio is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with GNU Radio; see the file COPYING. If not, write to
17# the Free Software Foundation, Inc., 51 Franklin Street,
18# Boston, MA 02110-1301, USA.
19
20########################################################################
21# Setup library
22########################################################################
23include(GrPlatform) #define LIB_SUFFIX
24
ptrkrysik18b631e2014-12-15 09:09:18 +010025include_directories(${Boost_INCLUDE_DIR} receiver)
piotr437f5462014-02-04 17:57:25 +010026link_directories(${Boost_LIBRARY_DIRS})
ptrkrysika25b8302015-05-08 08:59:17 +020027list(APPEND grgsm_sources
piotr7f3f3662014-07-08 16:47:53 +020028 receiver/receiver_impl.cc
Roman Khassraf8851d662015-06-07 16:42:37 +020029 receiver/receiver_config.cc
30 receiver/viterbi_detector.cc
piotr501c51e2014-07-08 23:24:07 +020031 receiver/sch.c
ptrkrysikf8c7e832015-04-04 12:28:20 +020032 receiver/clock_offset_control_impl.cc
rpp4f0f3b52015-06-10 10:23:30 +020033 receiver/cx_channel_hopper_impl.cc
piotrc00ce9c2014-08-04 11:21:24 +020034 misc_utils/bursts_printer_impl.cc
piotrdda22272014-08-04 11:31:54 +020035 misc_utils/extract_system_info_impl.cc
Roman Khassraf5bd14f22015-06-24 17:59:13 +020036 misc_utils/extract_immediate_assignment_impl.cc
ptrkrysik6dded652014-11-19 11:32:05 +010037 demapping/universal_ctrl_chans_demapper_impl.cc
Roman Khassraffb6bc502015-04-14 15:44:40 +020038 demapping/tch_f_chans_demapper_impl.cc
piotrfaacc722014-07-20 23:48:32 +020039 decoding/control_channels_decoder_impl.cc
40 decoding/cch.c
41 decoding/fire_crc.c
Roman Khassraf059bab92015-05-20 12:49:46 +020042 decoding/tch_f_decoder_impl.cc
Roman Khassrafd38206c2015-06-07 16:26:29 +020043 decoding/AmrCoder.cpp
Roman Khassraf059bab92015-05-20 12:49:46 +020044 decoding/BitVector.cpp
45 decoding/GSM610Tables.cpp
46 decoding/GSM660Tables.cpp
Roman Khassrafd38206c2015-06-07 16:26:29 +020047 decoding/GSM503Tables.cpp
Roman Khassrafd71e6582015-06-02 08:49:12 +020048 decoding/ViterbiR204.cpp
Roman Khassrafdbc3a502015-08-03 23:20:20 +020049 flow_control/burst_timeslot_splitter_impl.cc
Roman Khassrafa1eb1882015-08-05 12:30:29 +020050 flow_control/burst_sdcch_subslot_splitter_impl.cc
Roman Khassrafd7e3eec2015-08-06 11:54:22 +020051 flow_control/burst_timeslot_filter_impl.cc
Roman Khassraf8b64d872015-08-06 17:30:04 +020052 flow_control/burst_sdcch_subslot_filter_impl.cc
Roman Khassraf8e3b0ec2015-08-04 11:16:04 +020053 flow_control/burst_fnr_filter_impl.cc
Roman Khassraf7cccb522015-08-04 12:26:54 +020054 flow_control/dummy_burst_filter_impl.cc
piotr4089c1a2014-08-06 14:10:56 +020055 misc_utils/controlled_rotator_cc_impl.cc
56 misc_utils/controlled_const_source_f_impl.cc
57 misc_utils/message_printer_impl.cc
ptrkrysikdd700c12015-01-15 11:47:38 +010058 misc_utils/tmsi_dumper_impl.cc
Roman Khassraf1c3419e2015-08-03 10:58:57 +020059 misc_utils/burst_file_sink_impl.cc
60 misc_utils/burst_file_source_impl.cc
Roman Khassrafc3234542015-08-03 16:17:46 +020061 misc_utils/message_file_sink_impl.cc
Roman Khassrafe91edbd2015-08-05 13:23:38 +020062 misc_utils/message_file_source_impl.cc
Roman Khassraf1ce44692015-08-03 11:16:10 +020063 qa_utils/burst_sink_impl.cc
64 qa_utils/burst_source_impl.cc
Roman Khassrafb8f49092015-08-03 10:08:18 +020065 qa_utils/message_source_impl.cc
66 qa_utils/message_sink_impl.cc
67 decryption/decryption_impl.cc
68)
piotr437f5462014-02-04 17:57:25 +010069
piotr437f5462014-02-04 17:57:25 +010070
Piotr Krysik8722be52016-02-19 15:22:51 +010071add_library(grgsm SHARED ${grgsm_sources})
Piotr Krysik0fdbfdd2016-02-19 19:33:17 +010072target_link_libraries(grgsm ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES} ${LIBOSMOCORE_LIBRARIES}
ptrkrysik30f39452014-12-05 18:25:58 +010073# libraries required by plotting.h - have troubles to be installed by pybombs
74# boost_iostreams
75# boost_system
76# boost_filesystem
piotr3f1ea812014-04-17 10:56:08 +020077)
Piotr Krysik0fdbfdd2016-02-19 19:33:17 +010078set_target_properties(grgsm PROPERTIES DEFINE_SYMBOL "grgsm_EXPORTS")
piotr437f5462014-02-04 17:57:25 +010079
80########################################################################
81# Install built library files
82########################################################################
Piotr Krysik8722be52016-02-19 15:22:51 +010083install(TARGETS grgsm
piotr437f5462014-02-04 17:57:25 +010084 LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file
85 ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
86 RUNTIME DESTINATION bin # .dll file
87)
88
89########################################################################
90# Build and register unit test
91########################################################################
piotr7f3f3662014-07-08 16:47:53 +020092#include(GrTest)
piotr437f5462014-02-04 17:57:25 +010093
piotr7f3f3662014-07-08 16:47:53 +020094#include_directories(${CPPUNIT_INCLUDE_DIRS})
piotr437f5462014-02-04 17:57:25 +010095
ptrkrysika25b8302015-05-08 08:59:17 +020096#list(APPEND test_grgsm_sources
piotr7f3f3662014-07-08 16:47:53 +020097# ${CMAKE_CURRENT_SOURCE_DIR}/test_gsm.cc
98# ${CMAKE_CURRENT_SOURCE_DIR}/qa_gsm.cc
99# ${CMAKE_CURRENT_SOURCE_DIR}/qa_receiver.cc
100#)
piotr437f5462014-02-04 17:57:25 +0100101
ptrkrysika25b8302015-05-08 08:59:17 +0200102#add_executable(test-gsm ${test_grgsm_sources})
piotr437f5462014-02-04 17:57:25 +0100103
piotr7f3f3662014-07-08 16:47:53 +0200104#target_link_libraries(
105# test-gsm
106# ${GNURADIO_RUNTIME_LIBRARIES}
107# ${Boost_LIBRARIES}
108# ${CPPUNIT_LIBRARIES}
Piotr Krysik8722be52016-02-19 15:22:51 +0100109# grgsm
piotr7f3f3662014-07-08 16:47:53 +0200110#)
piotr437f5462014-02-04 17:57:25 +0100111
piotr7f3f3662014-07-08 16:47:53 +0200112#GR_ADD_TEST(test_gsm test-gsm)