Merge pull request #9 from softwareradiosystems/next_paul_libs

Next paul libs
This commit is contained in:
Ismael Gomez 2017-06-08 12:30:29 +02:00 committed by GitHub
commit b104e85c78
29 changed files with 93 additions and 48 deletions

View File

@ -56,13 +56,16 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
######################################################################## ########################################################################
# Options # Options
######################################################################## ########################################################################
option(STATIC_BUILD "Attempt to build with static linking" OFF) option(ENABLE_SRSUE "Build srsUE application" ON)
option(RPATH "Enable RPATH" OFF) option(ENABLE_SRSENB "Build srsENB application" ON)
option(ENABLE_VOLK "Enable VOLK SIMD library" ON)
option(ENABLE_GUI "Enable GUI" ON) option(ENABLE_VOLK "Enable use of VOLK SIMD library" ON)
option(ENABLE_SRSUE "Build srsUE application" ON) option(ENABLE_GUI "Enable GUI (using srsGUI)" ON)
option(ENABLE_SRSENB "Build srsENB application" ON) option(ENABLE_BLADERF "Enable BladeRF" ON)
option(ENABLE_BLADERF "Enable BladeRF" ON)
option(BUILD_STATIC "Attempt to statically link external deps" OFF)
option(RPATH "Enable RPATH" OFF)
option(USE_LTE_RATES "Use standard LTE sampling rates" OFF) option(USE_LTE_RATES "Use standard LTE sampling rates" OFF)
set(GCC_ARCH native CACHE STRING "GCC compile for specific architecture.") set(GCC_ARCH native CACHE STRING "GCC compile for specific architecture.")
@ -275,11 +278,9 @@ add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
######################################################################## ########################################################################
# Macro to add -fPIC property to static libs # Add -fPIC property to all targets
######################################################################## ########################################################################
macro(SRSLTE_SET_PIC) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set_target_properties(${ARGV} PROPERTIES COMPILE_FLAGS -fPIC)
endmacro(SRSLTE_SET_PIC)
######################################################################## ########################################################################
# Print summary # Print summary

View File

@ -19,7 +19,7 @@
# #
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-unused-but-set-variable -Wno-unused-variable -Wno-return-type -Wno-sign-compare -Wno-reorder -Wno-parantheses") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-unused-but-set-variable -Wno-unused-variable -Wno-return-type -Wno-sign-compare -Wno-reorder -Wno-parantheses")
add_library(srslte_asn1 SHARED add_library(srslte_asn1 STATIC
liblte_common.cc liblte_common.cc
liblte_rrc.cc liblte_rrc.cc
liblte_mme.cc liblte_mme.cc

View File

@ -20,8 +20,9 @@
file(GLOB CXX_SOURCES "*.cc") file(GLOB CXX_SOURCES "*.cc")
file(GLOB C_SOURCES "*.c") file(GLOB C_SOURCES "*.c")
add_library(srslte_common SHARED ${C_SOURCES} ${CXX_SOURCES})
add_library(srslte_common STATIC ${C_SOURCES} ${CXX_SOURCES})
target_include_directories(srslte_common PUBLIC ${SEC_INCLUDE_DIRS}) target_include_directories(srslte_common PUBLIC ${SEC_INCLUDE_DIRS})
target_link_libraries(srslte_common ${SEC_LIBRARIES}) target_link_libraries(srslte_common ${SEC_LIBRARIES})
install(TARGETS srslte_common DESTINATION ${LIBRARY_DIR}) install(TARGETS srslte_common DESTINATION ${LIBRARY_DIR})
SRSLTE_SET_PIC(srslte_common)

View File

@ -126,5 +126,4 @@ if(VOLK_FOUND)
endif(VOLK_FOUND) endif(VOLK_FOUND)
install(TARGETS srslte_phy DESTINATION ${LIBRARY_DIR}) install(TARGETS srslte_phy DESTINATION ${LIBRARY_DIR})
SRSLTE_SET_PIC(srslte_phy)

View File

@ -20,4 +20,3 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_agc OBJECT ${SOURCES}) add_library(srslte_agc OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_agc)

View File

@ -20,5 +20,4 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_ch_estimation OBJECT ${SOURCES}) add_library(srslte_ch_estimation OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_ch_estimation)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,4 +20,3 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_channel OBJECT ${SOURCES}) add_library(srslte_channel OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_channel)

View File

@ -20,4 +20,3 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_phy_common OBJECT ${SOURCES}) add_library(srslte_phy_common OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_phy_common)

View File

@ -20,5 +20,4 @@
set(SRCS dft_fftw.c dft_precoding.c ofdm.c) set(SRCS dft_fftw.c dft_precoding.c ofdm.c)
add_library(srslte_dft OBJECT ${SRCS}) add_library(srslte_dft OBJECT ${SRCS})
SRSLTE_SET_PIC(srslte_dft)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,4 +20,3 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_enb OBJECT ${SOURCES}) add_library(srslte_enb OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_enb)

View File

@ -20,5 +20,4 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_fec OBJECT ${SOURCES}) add_library(srslte_fec OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_fec)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,4 +20,3 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_io OBJECT ${SOURCES}) add_library(srslte_io OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_io)

View File

@ -20,5 +20,4 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_mimo OBJECT ${SOURCES}) add_library(srslte_mimo OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_mimo)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,5 +20,4 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_modem OBJECT ${SOURCES}) add_library(srslte_modem OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_modem)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,5 +20,4 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_phch OBJECT ${SOURCES}) add_library(srslte_phch OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_phch)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,5 +20,4 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_resampling OBJECT ${SOURCES}) add_library(srslte_resampling OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_resampling)
add_subdirectory(test) add_subdirectory(test)

View File

@ -56,5 +56,4 @@ if(RF_FOUND)
INSTALL(TARGETS srslte_rf DESTINATION ${LIBRARY_DIR}) INSTALL(TARGETS srslte_rf DESTINATION ${LIBRARY_DIR})
SRSLTE_SET_PIC(srslte_rf)
endif(RF_FOUND) endif(RF_FOUND)

View File

@ -20,5 +20,4 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_scrambling OBJECT ${SOURCES}) add_library(srslte_scrambling OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_scrambling)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,5 +20,4 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_sync OBJECT ${SOURCES}) add_library(srslte_sync OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_sync)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,4 +20,3 @@
file(GLOB SOURCES "*.c") file(GLOB SOURCES "*.c")
add_library(srslte_ue OBJECT ${SOURCES}) add_library(srslte_ue OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_ue)

View File

@ -25,5 +25,4 @@ if(VOLK_FOUND)
set_target_properties(srslte_utils PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}") set_target_properties(srslte_utils PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}")
endif(VOLK_FOUND) endif(VOLK_FOUND)
SRSLTE_SET_PIC(srslte_utils)
add_subdirectory(test) add_subdirectory(test)

View File

@ -20,7 +20,6 @@
if(RF_FOUND) if(RF_FOUND)
add_library(srslte_radio SHARED radio.cc radio_multi.cc) add_library(srslte_radio SHARED radio.cc radio_multi.cc)
install(TARGETS srslte_radio DESTINATION ${LIBRARY_DIR})
target_link_libraries(srslte_radio srslte_rf) target_link_libraries(srslte_radio srslte_rf)
SRSLTE_SET_PIC(srslte_radio) install(TARGETS srslte_radio DESTINATION ${LIBRARY_DIR})
endif(RF_FOUND) endif(RF_FOUND)

View File

@ -19,7 +19,6 @@
# #
file(GLOB SOURCES "*.cc") file(GLOB SOURCES "*.cc")
add_library(srslte_upper SHARED ${SOURCES}) add_library(srslte_upper STATIC ${SOURCES})
target_link_libraries(srslte_upper srslte_common srslte_asn1) target_link_libraries(srslte_upper srslte_common srslte_asn1)
install(TARGETS srslte_upper DESTINATION ${LIBRARY_DIR}) install(TARGETS srslte_upper DESTINATION ${LIBRARY_DIR})
SRSLTE_SET_PIC(srslte_upper)

View File

@ -1,5 +1,24 @@
#
# Copyright 2013-2017 Software Radio Systems Limited
#
# This file is part of srsLTE
#
# 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 "*.cc") file(GLOB SOURCES "*.cc")
add_library(srsenb_mac SHARED ${SOURCES}) add_library(srsenb_mac STATIC ${SOURCES})
target_link_libraries(srsenb_mac) install(TARGETS srsenb_mac DESTINATION ${LIBRARY_DIR})

View File

@ -1,8 +1,29 @@
#
# Copyright 2013-2017 Software Radio Systems Limited
#
# This file is part of srsLTE
#
# 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 "*.cc") file(GLOB SOURCES "*.cc")
add_library(srsenb_phy SHARED ${SOURCES}) add_library(srsenb_phy STATIC ${SOURCES})
target_link_libraries(srsenb_phy)
if(ENABLE_GUI AND SRSGUI_FOUND) if(ENABLE_GUI AND SRSGUI_FOUND)
target_link_libraries(srsenb_phy ${SRSGUI_LIBRARIES}) target_link_libraries(srsenb_phy ${SRSGUI_LIBRARIES})
endif(ENABLE_GUI AND SRSGUI_FOUND) endif(ENABLE_GUI AND SRSGUI_FOUND)
install(TARGETS srsenb_phy DESTINATION ${LIBRARY_DIR})

View File

@ -1,3 +1,24 @@
#
# Copyright 2013-2017 Software Radio Systems Limited
#
# This file is part of srsLTE
#
# 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 "*.cc") file(GLOB SOURCES "*.cc")
add_library(srsenb_upper SHARED ${SOURCES}) add_library(srsenb_upper STATIC ${SOURCES})
target_link_libraries(srsenb_upper) install(TARGETS srsenb_upper DESTINATION ${LIBRARY_DIR})

View File

@ -19,5 +19,5 @@
# #
file(GLOB SOURCES "*.cc") file(GLOB SOURCES "*.cc")
add_library(srsue_mac ${SOURCES}) add_library(srsue_mac STATIC ${SOURCES})
target_link_libraries(srsue_mac) install(TARGETS srsue_mac DESTINATION ${LIBRARY_DIR})

View File

@ -19,9 +19,10 @@
# #
file(GLOB SOURCES "*.cc") file(GLOB SOURCES "*.cc")
add_library(srsue_phy ${SOURCES}) add_library(srsue_phy STATIC ${SOURCES})
target_link_libraries(srsue_phy ${SRSLTE_PHY_LIBRARY})
if(ENABLE_GUI AND SRSGUI_FOUND) if(ENABLE_GUI AND SRSGUI_FOUND)
target_link_libraries(srsue_phy ${SRSGUI_LIBRARIES}) target_link_libraries(srsue_phy ${SRSGUI_LIBRARIES})
endif(ENABLE_GUI AND SRSGUI_FOUND) endif(ENABLE_GUI AND SRSGUI_FOUND)
install(TARGETS srsue_phy DESTINATION ${LIBRARY_DIR})

View File

@ -19,4 +19,5 @@
# #
file(GLOB SOURCES "*.cc") file(GLOB SOURCES "*.cc")
add_library(srsue_upper SHARED ${SOURCES}) add_library(srsue_upper STATIC ${SOURCES})
install(TARGETS srsue_upper DESTINATION ${LIBRARY_DIR})