Changed organization of cmake files

Cmake files were added into subdirectories.
This commit is contained in:
Piotr Krysik 2017-09-13 09:17:50 +02:00
parent a056c2c280
commit 0945cc5512
14 changed files with 358 additions and 67 deletions

View File

@ -17,12 +17,29 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
########################################################################
# Setup library
########################################################################
include(GrPlatform) #define LIB_SUFFIX
include(GrMiscUtils)
########################################################################
# Add sources macro
########################################################################
set(grgsm_sources "")
macro (add_sources)
file (RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}/lib" "${CMAKE_CURRENT_SOURCE_DIR}")
foreach (_src ${ARGN})
if (_relPath)
list (APPEND grgsm_sources "${_relPath}/${_src}")
else()
list (APPEND grgsm_sources "${_src}")
endif()
endforeach()
if (_relPath)
# propagate grgsm_sources to parent directory
set (grgsm_sources ${grgsm_sources} PARENT_SCOPE)
endif()
endmacro()
########################################################################
# Handle the generated constants
########################################################################
@ -42,62 +59,23 @@ configure_file(
ESCAPE_QUOTES
@ONLY)
list(APPEND grgsm_sources ${CMAKE_CURRENT_BINARY_DIR}/constants.cc)
add_sources(constants.cc)
#########################################################################
# Subdirecories
#########################################################################
add_subdirectory(decoding)
add_subdirectory(decryption)
add_subdirectory(demapping)
add_subdirectory(flow_control)
add_subdirectory(misc_utils)
add_subdirectory(qa_utils)
add_subdirectory(receiver)
########################################################################
# Setup library
########################################################################
include_directories(${Boost_INCLUDE_DIR} receiver)
link_directories(${Boost_LIBRARY_DIRS})
list(APPEND grgsm_sources
receiver/receiver_impl.cc
receiver/receiver_config.cc
receiver/viterbi_detector.cc
decoding/sch.c
receiver/clock_offset_control_impl.cc
receiver/cx_channel_hopper_impl.cc
demapping/universal_ctrl_chans_demapper_impl.cc
demapping/tch_f_chans_demapper_impl.cc
decoding/control_channels_decoder_impl.cc
decoding/tch_f_decoder_impl.cc
decoding/openbts/AmrCoder.cpp
decoding/openbts/BitVector.cpp
decoding/openbts/GSM610Tables.cpp
decoding/openbts/GSM660Tables.cpp
decoding/openbts/GSM503Tables.cpp
decoding/openbts/ViterbiR204.cpp
decoding/osmocom/coding/gsm0503_conv.c
decoding/osmocom/coding/gsm0503_coding.c
decoding/osmocom/coding/gsm0503_interleaving.c
decoding/osmocom/coding/gsm0503_mapping.c
decoding/osmocom/coding/gsm0503_parity.c
decoding/osmocom/coding/gsm0503_tables.c
flow_control/burst_timeslot_splitter_impl.cc
flow_control/burst_sdcch_subslot_splitter_impl.cc
flow_control/burst_timeslot_filter_impl.cc
flow_control/burst_sdcch_subslot_filter_impl.cc
flow_control/burst_fnr_filter_impl.cc
flow_control/dummy_burst_filter_impl.cc
flow_control/uplink_downlink_splitter_impl.cc
misc_utils/collect_system_info_impl.cc
misc_utils/controlled_rotator_cc_impl.cc
misc_utils/controlled_fractional_resampler_cc_impl.cc
misc_utils/msg_to_tag_impl.cc
misc_utils/message_printer_impl.cc
misc_utils/tmsi_dumper_impl.cc
misc_utils/burst_file_sink_impl.cc
misc_utils/burst_file_source_impl.cc
misc_utils/message_file_sink_impl.cc
misc_utils/message_file_source_impl.cc
misc_utils/bursts_printer_impl.cc
misc_utils/extract_system_info_impl.cc
misc_utils/extract_immediate_assignment_impl.cc
misc_utils/extract_cmc_impl.cc
qa_utils/burst_sink_impl.cc
qa_utils/burst_source_impl.cc
qa_utils/message_source_impl.cc
qa_utils/message_sink_impl.cc
decryption/decryption_impl.cc
)
add_library(grgsm SHARED ${grgsm_sources})
target_link_libraries(grgsm ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES} ${VOLK_LIBRARIES} ${LIBOSMOCODEC_LIBRARIES} ${LIBOSMOCORE_LIBRARIES}

View File

@ -0,0 +1,28 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(
control_channels_decoder_impl.cc
tch_f_decoder_impl.cc
sch.c
)
add_subdirectory(osmocom/coding)
add_subdirectory(openbts)

View File

@ -0,0 +1,28 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(
AmrCoder.cpp
BitVector.cpp
GSM610Tables.cpp
GSM660Tables.cpp
GSM503Tables.cpp
ViterbiR204.cpp
)

View File

@ -0,0 +1,28 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(APPEND grgsm_sources
gsm0503_conv.c
gsm0503_coding.c
gsm0503_interleaving.c
gsm0503_mapping.c
gsm0503_parity.c
gsm0503_tables.c
)

View File

@ -0,0 +1,22 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(
decryption_impl.cc
)

View File

@ -0,0 +1,24 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(
tch_f_chans_demapper_impl.cc
universal_ctrl_chans_demapper_impl.cc
)

View File

@ -0,0 +1,29 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(
burst_fnr_filter_impl.cc
burst_sdcch_subslot_filter_impl.cc
burst_sdcch_subslot_splitter_impl.cc
burst_timeslot_filter_impl.cc
burst_timeslot_splitter_impl.cc
dummy_burst_filter_impl.cc
uplink_downlink_splitter_impl.cc
)

View File

@ -0,0 +1,36 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(
burst_file_sink_impl.cc
burst_file_source_impl.cc
bursts_printer_impl.cc
collect_system_info_impl.cc
controlled_fractional_resampler_cc_impl.cc
controlled_rotator_cc_impl.cc
extract_cmc_impl.cc
extract_immediate_assignment_impl.cc
extract_system_info_impl.cc
message_file_sink_impl.cc
message_file_source_impl.cc
message_printer_impl.cc
msg_to_tag_impl.cc
tmsi_dumper_impl.cc
)

View File

@ -0,0 +1,25 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(
burst_sink_impl.cc
burst_source_impl.cc
message_sink_impl.cc
message_source_impl.cc
)

View File

@ -0,0 +1,26 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_sources(
clock_offset_control_impl.cc
cx_channel_hopper_impl.cc
receiver_config.cc
receiver_impl.cc
viterbi_detector.cc
)

View File

@ -28,20 +28,13 @@ endif()
########################################################################
# Install python sources
########################################################################
add_subdirectory(misc_utils)
add_subdirectory(receiver)
add_subdirectory(demapping)
GR_PYTHON_INSTALL(
FILES
__init__.py
demapping/gsm_bcch_ccch_demapper.py
demapping/gsm_bcch_ccch_sdcch4_demapper.py
demapping/gsm_sdcch8_demapper.py
receiver/gsm_input.py
receiver/fcch_burst_tagger.py
receiver/sch_detector.py
receiver/fcch_detector.py
receiver/chirpz.py
misc_utils/arfcn.py
misc_utils/clock_offset_corrector_tagged.py
misc_utils/hier_block.py DESTINATION ${GR_PYTHON_DIR}/grgsm
__init__.py DESTINATION ${GR_PYTHON_DIR}/grgsm
)
########################################################################

View File

@ -0,0 +1,24 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
install(FILES
gsm_bcch_ccch_demapper.py
gsm_bcch_ccch_sdcch4_demapper.py
gsm_sdcch8_demapper.py DESTINATION ${GR_PYTHON_DIR}/grgsm
)

View File

@ -0,0 +1,24 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
install(FILES
arfcn.py
clock_offset_corrector_tagged.py
hier_block.py DESTINATION ${GR_PYTHON_DIR}/grgsm
)

View File

@ -0,0 +1,26 @@
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
install(FILES
gsm_input.py
fcch_burst_tagger.py
sch_detector.py
fcch_detector.py
chirpz.py DESTINATION ${GR_PYTHON_DIR}/grgsm
)