Move radio CMakeLists.txt to subdirectory
- move following radios: AW2S, BladeRF, IRIS, LMSSDR, RFsimulator, USRP - move following transports: Ethernet, benetel4g, benetel5g - for each: create independent cmake variable to switch compilation on/off, in order: OAI_AW2S, OAI_BLADERF, OAI_IRIS, OAI_LMSSDR, OAI_SIMU, OAI_USRP, OAI_ETHERNET, OAI_BENETEL4G, OAI_BENETEL5G - Remove RF_BOARD variable, allows to compile multiple boards at once - where applicable: remove USERSPACE/LIB in path, i.e., move files up to directories, as all are userspace libraries Note that with the above, it is now mandatory to enable a radio implementation before compiling it, e.g., for USRP: ./build_oai -w USRP cmake .. -DOAI_USRP=ON && ninja oai_usrpdevif
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
add_library(oai_eth_transpro MODULE
|
||||
ethernet_lib.c
|
||||
eth_udp.c
|
||||
eth_raw.c
|
||||
)
|
||||
target_include_directories(oai_eth_transpro PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set_target_properties(oai_eth_transpro PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
add_subdirectory(benetel)
|
||||
@@ -0,0 +1,17 @@
|
||||
pkg_check_modules(libdpdk REQUIRED libdpdk=20.05.0)
|
||||
|
||||
add_library(benetel_4g MODULE
|
||||
benetel.c
|
||||
shared_buffers.c
|
||||
low.c
|
||||
low_dpdk.c
|
||||
dpdk_driver.c
|
||||
)
|
||||
|
||||
target_compile_definitions(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
|
||||
|
||||
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
|
||||
target_include_directories(benetel_4g PRIVATE ${libdpdk_INCLUDE_DIRS})
|
||||
target_link_libraries(benetel_4g PRIVATE ${libdpdk_LIBRARIES})
|
||||
target_link_libraries(benetel_4g PRIVATE pthread dl rt m numa)
|
||||
set_target_properties(benetel_4g PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
@@ -0,0 +1,16 @@
|
||||
pkg_check_modules(libdpdk REQUIRED libdpdk=20.05.0)
|
||||
|
||||
add_library(benetel_5g MODULE
|
||||
benetel.c
|
||||
shared_buffers.c
|
||||
low.c
|
||||
low_dpdk.c
|
||||
dpdk_driver.c
|
||||
)
|
||||
|
||||
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
|
||||
target_include_directories(benetel_5g PRIVATE ${libdpdk_INCLUDE_DIRS})
|
||||
target_link_libraries(benetel_5g PRIVATE ${libdpdk_LIBRARIES})
|
||||
target_link_libraries(benetel_5g PRIVATE pthread dl rt m numa)
|
||||
set_target_properties(benetel_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
|
||||
set_target_properties(benetel_5g PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
@@ -0,0 +1,9 @@
|
||||
add_boolean_option(OAI_BENETEL4G OFF "Activate OAI's Benetel 4G radio driver" OFF)
|
||||
if(OAI_BENETEL4G)
|
||||
add_subdirectory(4g)
|
||||
endif()
|
||||
|
||||
add_boolean_option(OAI_BENETEL5G OFF "Activate OAI's Benetel 5G radio driver" OFF)
|
||||
if(OAI_BENETEL5G)
|
||||
add_subdirectory(5g)
|
||||
endif()
|
||||
@@ -19,7 +19,7 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file radio/ETHERNET/USERSPACE/LIB/if_defs.h
|
||||
/*! \file radio/ETHERNET/if_defs.h
|
||||
* \brief
|
||||
* \author S. Sandeep Kumar, Raymond Knopp
|
||||
* \date 2016
|
||||
Reference in New Issue
Block a user