diff --git a/srslte/CMakeLists.txt b/srslte/CMakeLists.txt index cb1c27107..9fc12a9e8 100644 --- a/srslte/CMakeLists.txt +++ b/srslte/CMakeLists.txt @@ -45,12 +45,42 @@ ADD_CUSTOM_TARGET (add_srslte_headers SOURCES ${HEADERS_ALL}) FIND_PACKAGE(UHD) FIND_PACKAGE(bladeRF) +IF(UHD_FOUND) + INCLUDE_DIRECTORIES(${UHD_INCLUDE_DIRS}) + LINK_DIRECTORIES(${UHD_LIBRARY_DIRS}) +ENDIF(UHD_FOUND) + +IF(BLADERF_FOUND) + INCLUDE_DIRECTORIES(${BLADERF_INCLUDE_DIRS}) + LINK_DIRECTORIES(${BLADERF_LIBRARY_DIRS}) +ENDIF(BLADERF_FOUND) + IF(BLADERF_FOUND OR UHD_FOUND) set(RF_FOUND TRUE CACHE INTERNAL "RF frontend found") ELSE(BLADERF_FOUND OR UHD_FOUND) set(RF_FOUND FALSE CACHE INTERNAL "RF frontend found") + add_definitions(-DDISABLE_RF) ENDIF(BLADERF_FOUND OR UHD_FOUND) +include(CheckFunctionExistsMath) +IF(${DISABLE_VOLK}) + IF(${DISABLE_VOLK} EQUAL 0) + FIND_PACKAGE(Volk) + ELSE(${DISABLE_VOLK} EQUAL 0) + MESSAGE(STATUS "VOLK library disabled (DISABLE_VOLK=1)") + ENDIF(${DISABLE_VOLK} EQUAL 0) +ELSE(${DISABLE_VOLK}) + FIND_PACKAGE(Volk) +ENDIF(${DISABLE_VOLK}) + +IF(VOLK_FOUND) + INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS}) + LINK_DIRECTORIES(${VOLK_LIBRARY_DIRS}) + MESSAGE(STATUS " Compiling with VOLK SIMD library.") +ELSE(VOLK_FOUND) + MESSAGE(STATUS " VOLK SIMD library NOT found. Using generic implementation.") +ENDIF(VOLK_FOUND) + ######################################################################## # Add subdirectories ######################################################################## diff --git a/srslte/examples/CMakeLists.txt b/srslte/examples/CMakeLists.txt index bf0f357e7..531699b71 100644 --- a/srslte/examples/CMakeLists.txt +++ b/srslte/examples/CMakeLists.txt @@ -18,10 +18,6 @@ # and at http://www.gnu.org/licenses/. # -IF(UHD_FOUND) - LINK_DIRECTORIES(${UHD_LIBRARY_DIRS}) -ENDIF(UHD_FOUND) - ################################################################# # Applications @@ -85,5 +81,5 @@ ELSE(RF_FOUND) ENDIF(RF_FOUND) # Add subdirectories -add_subdirectory(tutorial_examples) +ADD_SUBDIRECTORY(tutorial_examples) diff --git a/srslte/lib/CMakeLists.txt b/srslte/lib/CMakeLists.txt index 1b2cc2aa3..9b68b7e3e 100644 --- a/srslte/lib/CMakeLists.txt +++ b/srslte/lib/CMakeLists.txt @@ -18,115 +18,48 @@ # and at http://www.gnu.org/licenses/. # +ADD_SUBDIRECTORY(agc) +ADD_SUBDIRECTORY(ch_estimation) +ADD_SUBDIRECTORY(common) +ADD_SUBDIRECTORY(fec) +ADD_SUBDIRECTORY(mimo) +ADD_SUBDIRECTORY(phch) +ADD_SUBDIRECTORY(rf) +ADD_SUBDIRECTORY(sync) +ADD_SUBDIRECTORY(utils) +ADD_SUBDIRECTORY(channel) +ADD_SUBDIRECTORY(dft) +ADD_SUBDIRECTORY(io) +ADD_SUBDIRECTORY(modem) +ADD_SUBDIRECTORY(resampling) +ADD_SUBDIRECTORY(scrambling) +ADD_SUBDIRECTORY(ue) -######################################################################## -# Find Dependencies -######################################################################## -include(CheckFunctionExistsMath) - -FIND_PACKAGE(SRSGUI) -FIND_PACKAGE(FFTW3F REQUIRED) # TODO: distribute kissfft instead - -IF(${DISABLE_VOLK}) - IF(${DISABLE_VOLK} EQUAL 0) - FIND_PACKAGE(Volk) - ELSE(${DISABLE_VOLK} EQUAL 0) - MESSAGE(STATUS "VOLK library disabled (DISABLE_VOLK=1)") - ENDIF(${DISABLE_VOLK} EQUAL 0) -ELSE(${DISABLE_VOLK}) - FIND_PACKAGE(Volk) -ENDIF(${DISABLE_VOLK}) +ADD_LIBRARY(srslte SHARED version.c) +TARGET_LINK_LIBRARIES(srslte srslte_agc + srslte_ch_estimation + srslte_common + srslte_fec + srslte_mimo + srslte_phch + srslte_sync + srslte_utils + srslte_channel + srslte_dft + srslte_io + srslte_modem + srslte_resampling + srslte_scrambling + srslte_ue + pthread) +SET_TARGET_PROPERTIES(srslte PROPERTIES + VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}) IF(VOLK_FOUND) - INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS}) - LINK_DIRECTORIES(${VOLK_LIBRARY_DIRS}) + SET_TARGET_PROPERTIES(srslte PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}") + TARGET_LINK_LIBRARIES(srslte ${VOLK_LIBRARIES}) ENDIF(VOLK_FOUND) -IF(FFTW3F_FOUND) - INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) - LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS}) -ENDIF(FFTW3F_FOUND) - -IF(SRSGUI_FOUND) - INCLUDE_DIRECTORIES(${SRSGUI_INCLUDE_DIRS}) - LINK_DIRECTORIES(${SRSGUI_LIBRARY_DIRS}) -ENDIF(SRSGUI_FOUND) - -######################################################################## -# Recurse subdirectories and compile all source files into the same lib -######################################################################## -FILE(GLOB modules *) -SET(SOURCES_ALL "") -FOREACH (_module ${modules}) - IF(IS_DIRECTORY ${_module}) - IF (NOT ${_module} MATCHES "rf") - FILE(GLOB_RECURSE tmp "${_module}/src/*.c") - LIST(APPEND SOURCES_ALL ${tmp}) - ENDIF (NOT ${_module} MATCHES "rf") - ENDIF(IS_DIRECTORY ${_module}) -ENDFOREACH() - -ADD_LIBRARY(srslte SHARED ${SOURCES_ALL}) -TARGET_LINK_LIBRARIES(srslte m ${FFTW3F_LIBRARIES}) -SET_TARGET_PROPERTIES(srslte - PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR} -) - -IF(RF_FOUND) - # Include common RF files - SET(SOURCES_RF "") - LIST(APPEND SOURCES_RF "rf/src/rf_imp.c" "rf/src/rf_utils.c") - - IF (UHD_FOUND) - INCLUDE_DIRECTORIES(${UHD_INCLUDE_DIRS}) - LINK_DIRECTORIES(${UHD_LIBRARY_DIRS}) - add_definitions(-DENABLE_UHD) - LIST(APPEND SOURCES_RF "rf/src/rf_uhd_imp.c" "rf/src/uhd_c_api.cpp") - ENDIF (UHD_FOUND) - - IF (BLADERF_FOUND) - INCLUDE_DIRECTORIES(${BLADERF_INCLUDE_DIRS}) - add_definitions(-DENABLE_BLADERF) - LIST(APPEND SOURCES_RF "rf/src/rf_blade_imp.c") - ENDIF (BLADERF_FOUND) - - ADD_LIBRARY(srslte_rf SHARED ${SOURCES_RF}) - SET_TARGET_PROPERTIES(srslte_rf - PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR} - ) - - IF (UHD_FOUND) - TARGET_LINK_LIBRARIES(srslte_rf ${UHD_LIBRARIES}) - ENDIF (UHD_FOUND) - - IF (BLADERF_FOUND) - TARGET_LINK_LIBRARIES(srslte_rf ${BLADERF_LIBRARIES}) - ENDIF (BLADERF_FOUND) - - INSTALL(TARGETS srslte_rf DESTINATION ${LIBRARY_DIR}) - SRSLTE_SET_PIC(srslte_rf) -ENDIF(RF_FOUND) - INSTALL(TARGETS srslte DESTINATION ${LIBRARY_DIR}) SRSLTE_SET_PIC(srslte) -IF(VOLK_FOUND) - INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS}) - SET_TARGET_PROPERTIES(srslte PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}") - TARGET_LINK_LIBRARIES(srslte ${VOLK_LIBRARIES}) - MESSAGE(STATUS " Compiling with VOLK SIMD library.") -ELSE(VOLK_FOUND) - MESSAGE(STATUS " VOLK SIMD library NOT found. Using generic implementation.") -ENDIF(VOLK_FOUND) - -######################################################################## -# Recurse subdirectories and find all directories with a CMakeLists.txt file in it -######################################################################## -FILE(GLOB_RECURSE cmakefiles CMakeLists.txt) -FOREACH (_file ${cmakefiles}) - GET_FILENAME_COMPONENT(dir ${_file} PATH) - IF (NOT ${dir} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) - ADD_SUBDIRECTORY(${dir}) - ENDIF () -ENDFOREACH() - diff --git a/srslte/lib/agc/CMakeLists.txt b/srslte/lib/agc/CMakeLists.txt new file mode 100644 index 000000000..19b5f4730 --- /dev/null +++ b/srslte/lib/agc/CMakeLists.txt @@ -0,0 +1,22 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_agc ${SOURCES}) diff --git a/srslte/lib/agc/src/agc.c b/srslte/lib/agc/agc.c similarity index 100% rename from srslte/lib/agc/src/agc.c rename to srslte/lib/agc/agc.c diff --git a/srslte/lib/bak.cmake b/srslte/lib/bak.cmake new file mode 100644 index 000000000..2cc24f0c8 --- /dev/null +++ b/srslte/lib/bak.cmake @@ -0,0 +1,137 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + + +######################################################################## +# Find Dependencies +######################################################################## +include(CheckFunctionExistsMath) + +FIND_PACKAGE(SRSGUI) +FIND_PACKAGE(FFTW3F REQUIRED) +FIND_PACKAGE(FFTS) + +IF(${DISABLE_VOLK}) + IF(${DISABLE_VOLK} EQUAL 0) + FIND_PACKAGE(Volk) + ELSE(${DISABLE_VOLK} EQUAL 0) + MESSAGE(STATUS "VOLK library disabled (DISABLE_VOLK=1)") + ENDIF(${DISABLE_VOLK} EQUAL 0) +ELSE(${DISABLE_VOLK}) + FIND_PACKAGE(Volk) +ENDIF(${DISABLE_VOLK}) + +IF(VOLK_FOUND) + INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS}) + LINK_DIRECTORIES(${VOLK_LIBRARY_DIRS}) +ENDIF(VOLK_FOUND) + +IF(FFTW3F_FOUND) + INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) + LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS}) +ENDIF(FFTW3F_FOUND) + +IF(SRSGUI_FOUND) + INCLUDE_DIRECTORIES(${SRSGUI_INCLUDE_DIRS}) + LINK_DIRECTORIES(${SRSGUI_LIBRARY_DIRS}) +ENDIF(SRSGUI_FOUND) + +######################################################################## +# Recurse subdirectories and compile all source files into the same lib +######################################################################## +FILE(GLOB modules *) +SET(SOURCES_ALL "") +FOREACH (_module ${modules}) + IF(IS_DIRECTORY ${_module}) + IF (NOT ${_module} MATCHES "rf") + FILE(GLOB_RECURSE tmp "${_module}/src/*.c") + LIST(APPEND SOURCES_ALL ${tmp}) + ENDIF (NOT ${_module} MATCHES "rf") + ENDIF(IS_DIRECTORY ${_module}) +ENDFOREACH() + +ADD_LIBRARY(srslte SHARED ${SOURCES_ALL}) +TARGET_LINK_LIBRARIES(srslte m ${FFTW3F_LIBRARIES}) +SET_TARGET_PROPERTIES(srslte + PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR} +) + +IF(FFTS_FOUND) + TARGET_LINK_LIBRARIES(srslte ${FFTS_LIBRARIES}) +ENDIF(FFTS_FOUND) + +IF(RF_FOUND) + # Include common RF files + SET(SOURCES_RF "") + LIST(APPEND SOURCES_RF "rf/src/rf_imp.c" "rf/src/rf_utils.c") + + IF (UHD_FOUND) + INCLUDE_DIRECTORIES(${UHD_INCLUDE_DIRS}) + LINK_DIRECTORIES(${UHD_LIBRARY_DIRS}) + add_definitions(-DENABLE_UHD) + LIST(APPEND SOURCES_RF "rf/src/rf_uhd_imp.c" "rf/src/uhd_c_api.cpp") + ENDIF (UHD_FOUND) + + IF (BLADERF_FOUND) + INCLUDE_DIRECTORIES(${BLADERF_INCLUDE_DIRS}) + add_definitions(-DENABLE_BLADERF) + LIST(APPEND SOURCES_RF "rf/src/rf_blade_imp.c") + ENDIF (BLADERF_FOUND) + + ADD_LIBRARY(srslte_rf SHARED ${SOURCES_RF}) + SET_TARGET_PROPERTIES(srslte_rf + PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR} + ) + + IF (UHD_FOUND) + TARGET_LINK_LIBRARIES(srslte_rf ${UHD_LIBRARIES}) + ENDIF (UHD_FOUND) + + IF (BLADERF_FOUND) + TARGET_LINK_LIBRARIES(srslte_rf ${BLADERF_LIBRARIES}) + ENDIF (BLADERF_FOUND) + + INSTALL(TARGETS srslte_rf DESTINATION ${LIBRARY_DIR}) + SRSLTE_SET_PIC(srslte_rf) +ENDIF(RF_FOUND) + +INSTALL(TARGETS srslte DESTINATION ${LIBRARY_DIR}) +SRSLTE_SET_PIC(srslte) + +IF(VOLK_FOUND) + INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS}) + SET_TARGET_PROPERTIES(srslte PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}") + TARGET_LINK_LIBRARIES(srslte ${VOLK_LIBRARIES}) + MESSAGE(STATUS " Compiling with VOLK SIMD library.") +ELSE(VOLK_FOUND) + MESSAGE(STATUS " VOLK SIMD library NOT found. Using generic implementation.") +ENDIF(VOLK_FOUND) + +######################################################################## +# Recurse subdirectories and find all directories with a CMakeLists.txt file in it +######################################################################## +FILE(GLOB_RECURSE cmakefiles CMakeLists.txt) +FOREACH (_file ${cmakefiles}) + GET_FILENAME_COMPONENT(dir ${_file} PATH) + IF (NOT ${dir} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) + ADD_SUBDIRECTORY(${dir}) + ENDIF () +ENDFOREACH() + diff --git a/srslte/lib/ch_estimation/CMakeLists.txt b/srslte/lib/ch_estimation/CMakeLists.txt new file mode 100644 index 000000000..cf33c7dc4 --- /dev/null +++ b/srslte/lib/ch_estimation/CMakeLists.txt @@ -0,0 +1,27 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_ch_estimation ${SOURCES}) +TARGET_LINK_LIBRARIES(srslte_ch_estimation srslte_common + srslte_resampling + srslte_utils + srslte_phch) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/ch_estimation/src/chest_dl.c b/srslte/lib/ch_estimation/chest_dl.c similarity index 100% rename from srslte/lib/ch_estimation/src/chest_dl.c rename to srslte/lib/ch_estimation/chest_dl.c diff --git a/srslte/lib/ch_estimation/src/refsignal_dl.c b/srslte/lib/ch_estimation/refsignal_dl.c similarity index 100% rename from srslte/lib/ch_estimation/src/refsignal_dl.c rename to srslte/lib/ch_estimation/refsignal_dl.c diff --git a/srslte/lib/ch_estimation/src/refsignal_ul.c b/srslte/lib/ch_estimation/refsignal_ul.c similarity index 100% rename from srslte/lib/ch_estimation/src/refsignal_ul.c rename to srslte/lib/ch_estimation/refsignal_ul.c diff --git a/srslte/lib/ch_estimation/src/ul_rs_tables.h b/srslte/lib/ch_estimation/ul_rs_tables.h similarity index 100% rename from srslte/lib/ch_estimation/src/ul_rs_tables.h rename to srslte/lib/ch_estimation/ul_rs_tables.h diff --git a/srslte/lib/channel/CMakeLists.txt b/srslte/lib/channel/CMakeLists.txt new file mode 100644 index 000000000..27df20d4e --- /dev/null +++ b/srslte/lib/channel/CMakeLists.txt @@ -0,0 +1,22 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_channel ${SOURCES}) diff --git a/srslte/lib/channel/src/ch_awgn.c b/srslte/lib/channel/ch_awgn.c similarity index 100% rename from srslte/lib/channel/src/ch_awgn.c rename to srslte/lib/channel/ch_awgn.c diff --git a/srslte/lib/channel/src/gauss.c b/srslte/lib/channel/gauss.c similarity index 100% rename from srslte/lib/channel/src/gauss.c rename to srslte/lib/channel/gauss.c diff --git a/srslte/lib/channel/src/gauss.h b/srslte/lib/channel/gauss.h similarity index 100% rename from srslte/lib/channel/src/gauss.h rename to srslte/lib/channel/gauss.h diff --git a/srslte/lib/common/CMakeLists.txt b/srslte/lib/common/CMakeLists.txt new file mode 100644 index 000000000..11637c421 --- /dev/null +++ b/srslte/lib/common/CMakeLists.txt @@ -0,0 +1,22 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_common ${SOURCES}) diff --git a/srslte/lib/common/src/phy_common.c b/srslte/lib/common/phy_common.c similarity index 100% rename from srslte/lib/common/src/phy_common.c rename to srslte/lib/common/phy_common.c diff --git a/srslte/lib/common/src/sequence.c b/srslte/lib/common/sequence.c similarity index 100% rename from srslte/lib/common/src/sequence.c rename to srslte/lib/common/sequence.c diff --git a/srslte/lib/common/src/timestamp.c b/srslte/lib/common/timestamp.c similarity index 100% rename from srslte/lib/common/src/timestamp.c rename to srslte/lib/common/timestamp.c diff --git a/srslte/lib/dft/CMakeLists.txt b/srslte/lib/dft/CMakeLists.txt new file mode 100644 index 000000000..55f0a9ca7 --- /dev/null +++ b/srslte/lib/dft/CMakeLists.txt @@ -0,0 +1,32 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FIND_PACKAGE(FFTW3F REQUIRED) +IF(FFTW3F_FOUND) + INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) + LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS}) +ENDIF(FFTW3F_FOUND) + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_dft ${SOURCES}) +TARGET_LINK_LIBRARIES(srslte_dft srslte_utils + m + ${FFTW3F_LIBRARIES}) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/dft/src/dft.c b/srslte/lib/dft/dft.c similarity index 100% rename from srslte/lib/dft/src/dft.c rename to srslte/lib/dft/dft.c diff --git a/srslte/lib/dft/src/dft_precoding.c b/srslte/lib/dft/dft_precoding.c similarity index 100% rename from srslte/lib/dft/src/dft_precoding.c rename to srslte/lib/dft/dft_precoding.c diff --git a/srslte/lib/dft/src/ofdm.c b/srslte/lib/dft/ofdm.c similarity index 100% rename from srslte/lib/dft/src/ofdm.c rename to srslte/lib/dft/ofdm.c diff --git a/srslte/lib/fec/CMakeLists.txt b/srslte/lib/fec/CMakeLists.txt new file mode 100644 index 000000000..26b0a154a --- /dev/null +++ b/srslte/lib/fec/CMakeLists.txt @@ -0,0 +1,24 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_fec ${SOURCES}) +target_link_libraries(srslte_fec srslte_utils) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/fec/src/cbsegm.c b/srslte/lib/fec/cbsegm.c similarity index 100% rename from srslte/lib/fec/src/cbsegm.c rename to srslte/lib/fec/cbsegm.c diff --git a/srslte/lib/fec/src/convcoder.c b/srslte/lib/fec/convcoder.c similarity index 100% rename from srslte/lib/fec/src/convcoder.c rename to srslte/lib/fec/convcoder.c diff --git a/srslte/lib/fec/src/crc.c b/srslte/lib/fec/crc.c similarity index 100% rename from srslte/lib/fec/src/crc.c rename to srslte/lib/fec/crc.c diff --git a/srslte/lib/fec/src/parity.c b/srslte/lib/fec/parity.c similarity index 100% rename from srslte/lib/fec/src/parity.c rename to srslte/lib/fec/parity.c diff --git a/srslte/lib/fec/src/parity.h b/srslte/lib/fec/parity.h similarity index 100% rename from srslte/lib/fec/src/parity.h rename to srslte/lib/fec/parity.h diff --git a/srslte/lib/fec/src/rm_conv.c b/srslte/lib/fec/rm_conv.c similarity index 100% rename from srslte/lib/fec/src/rm_conv.c rename to srslte/lib/fec/rm_conv.c diff --git a/srslte/lib/fec/src/rm_turbo.c b/srslte/lib/fec/rm_turbo.c similarity index 100% rename from srslte/lib/fec/src/rm_turbo.c rename to srslte/lib/fec/rm_turbo.c diff --git a/srslte/lib/fec/src/softbuffer.c b/srslte/lib/fec/softbuffer.c similarity index 100% rename from srslte/lib/fec/src/softbuffer.c rename to srslte/lib/fec/softbuffer.c diff --git a/srslte/lib/fec/src/tc_interl_lte.c b/srslte/lib/fec/tc_interl_lte.c similarity index 100% rename from srslte/lib/fec/src/tc_interl_lte.c rename to srslte/lib/fec/tc_interl_lte.c diff --git a/srslte/lib/fec/src/tc_interl_umts.c b/srslte/lib/fec/tc_interl_umts.c similarity index 100% rename from srslte/lib/fec/src/tc_interl_umts.c rename to srslte/lib/fec/tc_interl_umts.c diff --git a/srslte/lib/fec/src/turbocoder.c b/srslte/lib/fec/turbocoder.c similarity index 100% rename from srslte/lib/fec/src/turbocoder.c rename to srslte/lib/fec/turbocoder.c diff --git a/srslte/lib/fec/src/turbodecoder.c b/srslte/lib/fec/turbodecoder.c similarity index 100% rename from srslte/lib/fec/src/turbodecoder.c rename to srslte/lib/fec/turbodecoder.c diff --git a/srslte/lib/fec/src/turbodecoder_gen.c b/srslte/lib/fec/turbodecoder_gen.c similarity index 100% rename from srslte/lib/fec/src/turbodecoder_gen.c rename to srslte/lib/fec/turbodecoder_gen.c diff --git a/srslte/lib/fec/src/turbodecoder_sse.c b/srslte/lib/fec/turbodecoder_sse.c similarity index 100% rename from srslte/lib/fec/src/turbodecoder_sse.c rename to srslte/lib/fec/turbodecoder_sse.c diff --git a/srslte/lib/fec/src/viterbi.c b/srslte/lib/fec/viterbi.c similarity index 100% rename from srslte/lib/fec/src/viterbi.c rename to srslte/lib/fec/viterbi.c diff --git a/srslte/lib/fec/src/viterbi37.h b/srslte/lib/fec/viterbi37.h similarity index 100% rename from srslte/lib/fec/src/viterbi37.h rename to srslte/lib/fec/viterbi37.h diff --git a/srslte/lib/fec/src/viterbi37_port.c b/srslte/lib/fec/viterbi37_port.c similarity index 100% rename from srslte/lib/fec/src/viterbi37_port.c rename to srslte/lib/fec/viterbi37_port.c diff --git a/srslte/lib/fec/src/viterbi37_sse.c b/srslte/lib/fec/viterbi37_sse.c similarity index 100% rename from srslte/lib/fec/src/viterbi37_sse.c rename to srslte/lib/fec/viterbi37_sse.c diff --git a/srslte/lib/io/CMakeLists.txt b/srslte/lib/io/CMakeLists.txt new file mode 100644 index 000000000..bd5ddc05c --- /dev/null +++ b/srslte/lib/io/CMakeLists.txt @@ -0,0 +1,22 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_io ${SOURCES}) diff --git a/srslte/lib/io/src/binsource.c b/srslte/lib/io/binsource.c similarity index 100% rename from srslte/lib/io/src/binsource.c rename to srslte/lib/io/binsource.c diff --git a/srslte/lib/io/src/filesink.c b/srslte/lib/io/filesink.c similarity index 100% rename from srslte/lib/io/src/filesink.c rename to srslte/lib/io/filesink.c diff --git a/srslte/lib/io/src/filesource.c b/srslte/lib/io/filesource.c similarity index 100% rename from srslte/lib/io/src/filesource.c rename to srslte/lib/io/filesource.c diff --git a/srslte/lib/io/src/netsink.c b/srslte/lib/io/netsink.c similarity index 100% rename from srslte/lib/io/src/netsink.c rename to srslte/lib/io/netsink.c diff --git a/srslte/lib/io/src/netsource.c b/srslte/lib/io/netsource.c similarity index 100% rename from srslte/lib/io/src/netsource.c rename to srslte/lib/io/netsource.c diff --git a/srslte/lib/mimo/CMakeLists.txt b/srslte/lib/mimo/CMakeLists.txt new file mode 100644 index 000000000..caf5586fa --- /dev/null +++ b/srslte/lib/mimo/CMakeLists.txt @@ -0,0 +1,23 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_mimo ${SOURCES}) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/mimo/src/layermap.c b/srslte/lib/mimo/layermap.c similarity index 100% rename from srslte/lib/mimo/src/layermap.c rename to srslte/lib/mimo/layermap.c diff --git a/srslte/lib/mimo/src/precoding.c b/srslte/lib/mimo/precoding.c similarity index 100% rename from srslte/lib/mimo/src/precoding.c rename to srslte/lib/mimo/precoding.c diff --git a/srslte/lib/modem/CMakeLists.txt b/srslte/lib/modem/CMakeLists.txt new file mode 100644 index 000000000..fc463ad9e --- /dev/null +++ b/srslte/lib/modem/CMakeLists.txt @@ -0,0 +1,23 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_modem ${SOURCES}) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/modem/src/demod_hard.c b/srslte/lib/modem/demod_hard.c similarity index 100% rename from srslte/lib/modem/src/demod_hard.c rename to srslte/lib/modem/demod_hard.c diff --git a/srslte/lib/modem/src/demod_soft.c b/srslte/lib/modem/demod_soft.c similarity index 100% rename from srslte/lib/modem/src/demod_soft.c rename to srslte/lib/modem/demod_soft.c diff --git a/srslte/lib/modem/src/hard_demod_lte.c b/srslte/lib/modem/hard_demod_lte.c similarity index 100% rename from srslte/lib/modem/src/hard_demod_lte.c rename to srslte/lib/modem/hard_demod_lte.c diff --git a/srslte/lib/modem/src/hard_demod_lte.h b/srslte/lib/modem/hard_demod_lte.h similarity index 100% rename from srslte/lib/modem/src/hard_demod_lte.h rename to srslte/lib/modem/hard_demod_lte.h diff --git a/srslte/lib/modem/src/lte_tables.c b/srslte/lib/modem/lte_tables.c similarity index 100% rename from srslte/lib/modem/src/lte_tables.c rename to srslte/lib/modem/lte_tables.c diff --git a/srslte/lib/modem/src/lte_tables.h b/srslte/lib/modem/lte_tables.h similarity index 100% rename from srslte/lib/modem/src/lte_tables.h rename to srslte/lib/modem/lte_tables.h diff --git a/srslte/lib/modem/src/mod.c b/srslte/lib/modem/mod.c similarity index 100% rename from srslte/lib/modem/src/mod.c rename to srslte/lib/modem/mod.c diff --git a/srslte/lib/modem/src/modem_table.c b/srslte/lib/modem/modem_table.c similarity index 100% rename from srslte/lib/modem/src/modem_table.c rename to srslte/lib/modem/modem_table.c diff --git a/srslte/lib/phch/CMakeLists.txt b/srslte/lib/phch/CMakeLists.txt new file mode 100644 index 000000000..3762f5978 --- /dev/null +++ b/srslte/lib/phch/CMakeLists.txt @@ -0,0 +1,29 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_phch ${SOURCES}) +TARGET_LINK_LIBRARIES(srslte_phch srslte_common + srslte_mimo + srslte_fec + srslte_modem + srslte_scrambling + srslte_ch_estimation) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/phch/src/cqi.c b/srslte/lib/phch/cqi.c similarity index 100% rename from srslte/lib/phch/src/cqi.c rename to srslte/lib/phch/cqi.c diff --git a/srslte/lib/phch/src/dci.c b/srslte/lib/phch/dci.c similarity index 100% rename from srslte/lib/phch/src/dci.c rename to srslte/lib/phch/dci.c diff --git a/srslte/lib/phch/src/dci_sz_table.h b/srslte/lib/phch/dci_sz_table.h similarity index 100% rename from srslte/lib/phch/src/dci_sz_table.h rename to srslte/lib/phch/dci_sz_table.h diff --git a/srslte/lib/phch/src/pbch.c b/srslte/lib/phch/pbch.c similarity index 100% rename from srslte/lib/phch/src/pbch.c rename to srslte/lib/phch/pbch.c diff --git a/srslte/lib/phch/src/pcfich.c b/srslte/lib/phch/pcfich.c similarity index 100% rename from srslte/lib/phch/src/pcfich.c rename to srslte/lib/phch/pcfich.c diff --git a/srslte/lib/phch/src/pdcch.c b/srslte/lib/phch/pdcch.c similarity index 100% rename from srslte/lib/phch/src/pdcch.c rename to srslte/lib/phch/pdcch.c diff --git a/srslte/lib/phch/src/pdsch.c b/srslte/lib/phch/pdsch.c similarity index 100% rename from srslte/lib/phch/src/pdsch.c rename to srslte/lib/phch/pdsch.c diff --git a/srslte/lib/phch/src/phich.c b/srslte/lib/phch/phich.c similarity index 100% rename from srslte/lib/phch/src/phich.c rename to srslte/lib/phch/phich.c diff --git a/srslte/lib/phch/src/prach.c b/srslte/lib/phch/prach.c similarity index 100% rename from srslte/lib/phch/src/prach.c rename to srslte/lib/phch/prach.c diff --git a/srslte/lib/phch/src/prb_dl.c b/srslte/lib/phch/prb_dl.c similarity index 100% rename from srslte/lib/phch/src/prb_dl.c rename to srslte/lib/phch/prb_dl.c diff --git a/srslte/lib/phch/src/prb_dl.h b/srslte/lib/phch/prb_dl.h similarity index 100% rename from srslte/lib/phch/src/prb_dl.h rename to srslte/lib/phch/prb_dl.h diff --git a/srslte/lib/phch/src/pucch.c b/srslte/lib/phch/pucch.c similarity index 100% rename from srslte/lib/phch/src/pucch.c rename to srslte/lib/phch/pucch.c diff --git a/srslte/lib/phch/src/pusch.c b/srslte/lib/phch/pusch.c similarity index 100% rename from srslte/lib/phch/src/pusch.c rename to srslte/lib/phch/pusch.c diff --git a/srslte/lib/phch/src/ra.c b/srslte/lib/phch/ra.c similarity index 100% rename from srslte/lib/phch/src/ra.c rename to srslte/lib/phch/ra.c diff --git a/srslte/lib/phch/src/regs.c b/srslte/lib/phch/regs.c similarity index 100% rename from srslte/lib/phch/src/regs.c rename to srslte/lib/phch/regs.c diff --git a/srslte/lib/phch/src/sch.c b/srslte/lib/phch/sch.c similarity index 100% rename from srslte/lib/phch/src/sch.c rename to srslte/lib/phch/sch.c diff --git a/srslte/lib/phch/src/sequences.c b/srslte/lib/phch/sequences.c similarity index 100% rename from srslte/lib/phch/src/sequences.c rename to srslte/lib/phch/sequences.c diff --git a/srslte/lib/phch/src/tbs_tables.h b/srslte/lib/phch/tbs_tables.h similarity index 100% rename from srslte/lib/phch/src/tbs_tables.h rename to srslte/lib/phch/tbs_tables.h diff --git a/srslte/lib/phch/test/CMakeLists.txt b/srslte/lib/phch/test/CMakeLists.txt index fd7dc4cb0..bcb98a0c4 100644 --- a/srslte/lib/phch/test/CMakeLists.txt +++ b/srslte/lib/phch/test/CMakeLists.txt @@ -195,5 +195,5 @@ BuildMex(MEXNAME prach SOURCES prach_test_mex.c LIBRARIES srslte srslte_mex) IF(UHD_FOUND) ADD_EXECUTABLE(prach_test_usrp prach_test_usrp.c) - TARGET_LINK_LIBRARIES(prach_test_usrp srslte_rf srslte) + TARGET_LINK_LIBRARIES(prach_test_usrp srslte_rf srslte pthread) ENDIF(UHD_FOUND) diff --git a/srslte/lib/phch/src/uci.c b/srslte/lib/phch/uci.c similarity index 100% rename from srslte/lib/phch/src/uci.c rename to srslte/lib/phch/uci.c diff --git a/srslte/lib/resampling/CMakeLists.txt b/srslte/lib/resampling/CMakeLists.txt new file mode 100644 index 000000000..9bcf4b426 --- /dev/null +++ b/srslte/lib/resampling/CMakeLists.txt @@ -0,0 +1,23 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_resampling ${SOURCES}) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/resampling/src/decim.c b/srslte/lib/resampling/decim.c similarity index 100% rename from srslte/lib/resampling/src/decim.c rename to srslte/lib/resampling/decim.c diff --git a/srslte/lib/resampling/src/interp.c b/srslte/lib/resampling/interp.c similarity index 100% rename from srslte/lib/resampling/src/interp.c rename to srslte/lib/resampling/interp.c diff --git a/srslte/lib/resampling/src/resample_arb.c b/srslte/lib/resampling/resample_arb.c similarity index 100% rename from srslte/lib/resampling/src/resample_arb.c rename to srslte/lib/resampling/resample_arb.c diff --git a/srslte/lib/rf/CMakeLists.txt b/srslte/lib/rf/CMakeLists.txt new file mode 100644 index 000000000..410276e52 --- /dev/null +++ b/srslte/lib/rf/CMakeLists.txt @@ -0,0 +1,52 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +IF(RF_FOUND) + # Include common RF files + SET(SOURCES_RF "") + LIST(APPEND SOURCES_RF rf_imp.c rf_utils.c) + + IF (UHD_FOUND) + add_definitions(-DENABLE_UHD) + LIST(APPEND SOURCES_RF rf_uhd_imp.c uhd_c_api.cpp) + ENDIF (UHD_FOUND) + + IF (BLADERF_FOUND) + add_definitions(-DENABLE_BLADERF) + LIST(APPEND SOURCES_RF rf_blade_imp.c) + ENDIF (BLADERF_FOUND) + + ADD_LIBRARY(srslte_rf SHARED ${SOURCES_RF}) + SET_TARGET_PROPERTIES(srslte_rf + PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR} + ) + + IF (UHD_FOUND) + TARGET_LINK_LIBRARIES(srslte_rf ${UHD_LIBRARIES}) + ENDIF (UHD_FOUND) + + IF (BLADERF_FOUND) + TARGET_LINK_LIBRARIES(srslte_rf ${BLADERF_LIBRARIES}) + ENDIF (BLADERF_FOUND) + + INSTALL(TARGETS srslte_rf DESTINATION ${LIBRARY_DIR}) + SRSLTE_SET_PIC(srslte_rf) + +ENDIF(RF_FOUND) diff --git a/srslte/lib/rf/src/rf_blade_imp.c b/srslte/lib/rf/rf_blade_imp.c similarity index 100% rename from srslte/lib/rf/src/rf_blade_imp.c rename to srslte/lib/rf/rf_blade_imp.c diff --git a/srslte/lib/rf/src/rf_blade_imp.h b/srslte/lib/rf/rf_blade_imp.h similarity index 100% rename from srslte/lib/rf/src/rf_blade_imp.h rename to srslte/lib/rf/rf_blade_imp.h diff --git a/srslte/lib/rf/src/rf_dev.h b/srslte/lib/rf/rf_dev.h similarity index 100% rename from srslte/lib/rf/src/rf_dev.h rename to srslte/lib/rf/rf_dev.h diff --git a/srslte/lib/rf/src/rf_imp.c b/srslte/lib/rf/rf_imp.c similarity index 100% rename from srslte/lib/rf/src/rf_imp.c rename to srslte/lib/rf/rf_imp.c diff --git a/srslte/lib/rf/src/rf_uhd_imp.c b/srslte/lib/rf/rf_uhd_imp.c similarity index 100% rename from srslte/lib/rf/src/rf_uhd_imp.c rename to srslte/lib/rf/rf_uhd_imp.c diff --git a/srslte/lib/rf/src/rf_uhd_imp.h b/srslte/lib/rf/rf_uhd_imp.h similarity index 100% rename from srslte/lib/rf/src/rf_uhd_imp.h rename to srslte/lib/rf/rf_uhd_imp.h diff --git a/srslte/lib/rf/src/rf_utils.c b/srslte/lib/rf/rf_utils.c similarity index 100% rename from srslte/lib/rf/src/rf_utils.c rename to srslte/lib/rf/rf_utils.c diff --git a/srslte/lib/rf/src/uhd_c_api.cpp b/srslte/lib/rf/uhd_c_api.cpp similarity index 100% rename from srslte/lib/rf/src/uhd_c_api.cpp rename to srslte/lib/rf/uhd_c_api.cpp diff --git a/srslte/lib/rf/src/uhd_c_api.h b/srslte/lib/rf/uhd_c_api.h similarity index 100% rename from srslte/lib/rf/src/uhd_c_api.h rename to srslte/lib/rf/uhd_c_api.h diff --git a/srslte/lib/scrambling/CMakeLists.txt b/srslte/lib/scrambling/CMakeLists.txt new file mode 100644 index 000000000..a6b5cd421 --- /dev/null +++ b/srslte/lib/scrambling/CMakeLists.txt @@ -0,0 +1,23 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_scrambling ${SOURCES}) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/scrambling/src/scrambling.c b/srslte/lib/scrambling/scrambling.c similarity index 100% rename from srslte/lib/scrambling/src/scrambling.c rename to srslte/lib/scrambling/scrambling.c diff --git a/srslte/lib/sync/CMakeLists.txt b/srslte/lib/sync/CMakeLists.txt new file mode 100644 index 000000000..9589e1d6a --- /dev/null +++ b/srslte/lib/sync/CMakeLists.txt @@ -0,0 +1,24 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_sync ${SOURCES}) +target_link_libraries(srslte_sync srslte_common) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/sync/src/cfo.c b/srslte/lib/sync/cfo.c similarity index 100% rename from srslte/lib/sync/src/cfo.c rename to srslte/lib/sync/cfo.c diff --git a/srslte/lib/sync/src/cp.c b/srslte/lib/sync/cp.c similarity index 100% rename from srslte/lib/sync/src/cp.c rename to srslte/lib/sync/cp.c diff --git a/srslte/lib/sync/src/find_sss.c b/srslte/lib/sync/find_sss.c similarity index 100% rename from srslte/lib/sync/src/find_sss.c rename to srslte/lib/sync/find_sss.c diff --git a/srslte/lib/sync/src/gen_sss.c b/srslte/lib/sync/gen_sss.c similarity index 100% rename from srslte/lib/sync/src/gen_sss.c rename to srslte/lib/sync/gen_sss.c diff --git a/srslte/lib/sync/src/pss.c b/srslte/lib/sync/pss.c similarity index 100% rename from srslte/lib/sync/src/pss.c rename to srslte/lib/sync/pss.c diff --git a/srslte/lib/sync/src/sfo.c b/srslte/lib/sync/sfo.c similarity index 100% rename from srslte/lib/sync/src/sfo.c rename to srslte/lib/sync/sfo.c diff --git a/srslte/lib/sync/src/sss.c b/srslte/lib/sync/sss.c similarity index 100% rename from srslte/lib/sync/src/sss.c rename to srslte/lib/sync/sss.c diff --git a/srslte/lib/sync/src/sync.c b/srslte/lib/sync/sync.c similarity index 100% rename from srslte/lib/sync/src/sync.c rename to srslte/lib/sync/sync.c diff --git a/srslte/lib/ue/CMakeLists.txt b/srslte/lib/ue/CMakeLists.txt new file mode 100644 index 000000000..ba8647b30 --- /dev/null +++ b/srslte/lib/ue/CMakeLists.txt @@ -0,0 +1,26 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_ue ${SOURCES}) +TARGET_LINK_LIBRARIES(srslte_ue srslte_io + srslte_sync + srslte_dft + srslte_ch_estimation) diff --git a/srslte/lib/ue/src/ue_cell_search.c b/srslte/lib/ue/ue_cell_search.c similarity index 100% rename from srslte/lib/ue/src/ue_cell_search.c rename to srslte/lib/ue/ue_cell_search.c diff --git a/srslte/lib/ue/src/ue_dl.c b/srslte/lib/ue/ue_dl.c similarity index 100% rename from srslte/lib/ue/src/ue_dl.c rename to srslte/lib/ue/ue_dl.c diff --git a/srslte/lib/ue/src/ue_mib.c b/srslte/lib/ue/ue_mib.c similarity index 100% rename from srslte/lib/ue/src/ue_mib.c rename to srslte/lib/ue/ue_mib.c diff --git a/srslte/lib/ue/src/ue_sync.c b/srslte/lib/ue/ue_sync.c similarity index 100% rename from srslte/lib/ue/src/ue_sync.c rename to srslte/lib/ue/ue_sync.c diff --git a/srslte/lib/ue/src/ue_ul.c b/srslte/lib/ue/ue_ul.c similarity index 100% rename from srslte/lib/ue/src/ue_ul.c rename to srslte/lib/ue/ue_ul.c diff --git a/srslte/lib/utils/CMakeLists.txt b/srslte/lib/utils/CMakeLists.txt new file mode 100644 index 000000000..43c959692 --- /dev/null +++ b/srslte/lib/utils/CMakeLists.txt @@ -0,0 +1,24 @@ +# +# Copyright 2013-2015 Software Radio Systems Limited +# +# This file is part of the srsLTE library. +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +FILE(GLOB SOURCES "*.c") +ADD_LIBRARY(srslte_utils ${SOURCES}) +target_link_libraries(srslte_utils srslte_dft) +ADD_SUBDIRECTORY(test) diff --git a/srslte/lib/utils/src/bit.c b/srslte/lib/utils/bit.c similarity index 100% rename from srslte/lib/utils/src/bit.c rename to srslte/lib/utils/bit.c diff --git a/srslte/lib/utils/src/cexptab.c b/srslte/lib/utils/cexptab.c similarity index 100% rename from srslte/lib/utils/src/cexptab.c rename to srslte/lib/utils/cexptab.c diff --git a/srslte/lib/utils/src/convolution.c b/srslte/lib/utils/convolution.c similarity index 100% rename from srslte/lib/utils/src/convolution.c rename to srslte/lib/utils/convolution.c diff --git a/srslte/lib/utils/src/debug.c b/srslte/lib/utils/debug.c similarity index 100% rename from srslte/lib/utils/src/debug.c rename to srslte/lib/utils/debug.c diff --git a/srslte/lib/utils/src/vector.c b/srslte/lib/utils/vector.c similarity index 100% rename from srslte/lib/utils/src/vector.c rename to srslte/lib/utils/vector.c diff --git a/srslte/lib/utils/src/vector_simd.c b/srslte/lib/utils/vector_simd.c similarity index 100% rename from srslte/lib/utils/src/vector_simd.c rename to srslte/lib/utils/vector_simd.c diff --git a/srslte/lib/version/src/version.c b/srslte/lib/version.c similarity index 100% rename from srslte/lib/version/src/version.c rename to srslte/lib/version.c