Commit c25ee6fd authored by Robert Schmidt's avatar Robert Schmidt

Move symlink creation to radio/transport device to cmake

parent 00e3c5ac
......@@ -537,47 +537,28 @@ function main() {
# Build RF device and transport protocol libraries #
####################################################
if [ "$HW" != "None" ] ; then
rm -f liboai_device.so
if [ "$HW" == "OAI_USRP" ] ; then
compilations $BUILD_DIR oai_usrpdevif.txt oai_usrpdevif
ln -sf liboai_usrpdevif.so liboai_device.so
echo "liboai_device.so symlinks to liboai_usrpdevif.so"
elif [ "$HW" == "OAI_BLADERF" ] ; then
compilations $BUILD_DIR oai_bladerfdevif.txt oai_bladerfdevif
ln -sf liboai_bladerfdevif.so liboai_device.so
echo "liboai_device.so symlinks liboai_bladerfdevif.so"
elif [ "$HW" == "OAI_LMSSDR" ] ; then
compilations $BUILD_DIR oai_lmssdrdevif.txt oai_lmssdrdevif
ln -sf liboai_lmssdrdevif.so liboai_device.so
echo "liboai_device.so symlinks to liboai_lmssdrdevif.so"
elif [ "$HW" == "OAI_IRIS" ] ; then
compilations $BUILD_DIR oai_irisdevif.txt oai_irisdevif
ln -s liboai_irisdevif.so liboai_device.so
echo "liboai_device.so symlinks to liboai_irisdevif.so"
elif [ "$HW" == "OAI_AW2SORI" ] ; then
compilations $BUILD_DIR aw2sori_transpro.txt aw2sori_transpro
ln -sf libaw2sori_transpro.so libthirdparty_transpro.so
echo "libthirdparty_transpro.so symlinks to libaw2sori_transpro.so"
else
echo_fatal "illegal HW option $HW"
fi
fi
if [ "$TP" != "None" ]; then
rm -f liboai_transpro.so
if [ "$TP" == "Ethernet" ]; then
compilations $BUILD_DIR oai_eth_transpro.txt oai_eth_transpro
ln -sf liboai_eth_transpro.so liboai_transpro.so
echo_info "liboai_transpro.so symlinks to liboai_eth_transpro.so"
elif [ "$TP" == "benetel4g" ]; then
compilations $BUILD_DIR benetel_4g.txt benetel4g
ln -sf libbenetel_4g.so liboai_transpro.so
echo_info "liboai_transpro.so symlinks to libbenetel_4g.so"
elif [ "$TP" == "benetel5g" ]; then
compilations $BUILD_DIR benetel_5g.txt benetel_5g
ln -sf libbenetel_5g.so liboai_transpro.so
echo_info "liboai_transpro.so symlinks to libbenetel_5g.so"
else
echo_fatal "illegal TP option $TP"
fi
......
......@@ -11,3 +11,6 @@ add_library(aw2sori_transpro MODULE oaiori.c)
target_compile_options(aw2sori_transpro PRIVATE -shared -fPIC -msse4 -g -ggdb -DLITE_COMPILATION)
target_link_libraries(aw2sori_transpro PRIVATE ori oai_eth_transpro)
set_target_properties(aw2sori_transpro PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET aw2sori_transpro POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink libaw2sori_transpro.so libthirdparty_transpro.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
......@@ -2,3 +2,6 @@ pkg_check_modules(bladeRF REQUIRED libbladeRF)
add_library(oai_bladerfdevif MODULE bladerf_lib.c)
target_link_libraries(oai_bladerfdevif PRIVATE bladeRF)
set_target_properties(oai_bladerfdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_bladerfdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_bladerfdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
......@@ -5,5 +5,8 @@ add_library(oai_eth_transpro MODULE
)
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_custom_command(TARGET oai_eth_transpro POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_eth_transpro.so liboai_transpro.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_subdirectory(benetel)
......@@ -15,3 +15,6 @@ 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})
add_custom_command(TARGET benetel_4g POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink libbenetel_4g.so liboai_transpro.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
......@@ -14,3 +14,6 @@ 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})
add_custom_command(TARGET benetel_5g POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink libbenetel_5g.so liboai_transpro.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
......@@ -3,3 +3,6 @@ find_package(SoapySDR REQUIRED)
add_library(oai_irisdevif MODULE iris_lib.cpp)
target_link_libraries(oai_irisdevif PRIVATE SoapySDR)
set_target_properties(oai_irisdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_irisdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_irisdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
......@@ -3,3 +3,6 @@ find_package(LimeSuite REQUIRED)
add_library(oai_lmssdrdevif MODULE lms_lib.cpp)
target_link_libraries(oai_lmssdrdevif LimeSuite )
set_target_properties(oai_lmssdrdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_lmssdrdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_lmssdrdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
......@@ -5,3 +5,6 @@ add_library(oai_usrpdevif MODULE usrp_lib.cpp)
#target_include_directories(oai_usrpdevif PRIVATE Boost::boost)
target_link_libraries(oai_usrpdevif uhd)
set_target_properties(oai_usrpdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_usrpdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_usrpdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment