Commit 36694360 authored by Laurent THOMAS's avatar Laurent THOMAS

small optimisation in build_oai script

parent 4294a156
...@@ -598,84 +598,81 @@ function main() { ...@@ -598,84 +598,81 @@ function main() {
config_libconfig_shlib=params_libconfig config_libconfig_shlib=params_libconfig
# first generate the CMakefile in the right directory # first generate the CMakefile in the right directory
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$RU" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" -o "$ittiSIM" = "1" -o "$rfsimNas" = "1" ] ; then # softmodem compilation
# softmodem compilation cmake_file=$DIR/$build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
cmake_file=$DIR/$build_dir/CMakeLists.txt echo "project (OpenAirInterface)" >> $cmake_file
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "project (OpenAirInterface)" >> $cmake_file echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file # echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( PACKAGE_NAME \"${exec}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >> $cmake_file
echo "set ( PACKAGE_NAME \"${exec}\")" >> $cmake_file echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >> $cmake_file
echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >> $cmake_file echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >> $cmake_file echo "set ( UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE )" >> $cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file echo "set ( UE_DEBUG_TRACE $UE_DEBUG_TRACE )" >> $cmake_file
echo "set ( UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE )" >> $cmake_file echo "set ( UE_TIMING_TRACE $UE_TIMING_TRACE )" >> $cmake_file
echo "set ( UE_DEBUG_TRACE $UE_DEBUG_TRACE )" >> $cmake_file echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file
echo "set ( UE_TIMING_TRACE $UE_TIMING_TRACE )" >> $cmake_file echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file
echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file
echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file
echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file cd $DIR/$build_dir/build
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file eval $CMAKE_CMD
cd $DIR/$build_dir/build
eval $CMAKE_CMD execlist=""
if [ "$eNB" = "1" ] ; then
execlist=""
if [ "$eNB" = "1" ] ; then
execlist="$execlist lte-softmodem" execlist="$execlist lte-softmodem"
fi fi
if [ "$eNBocp" = "1" ] ; then if [ "$eNBocp" = "1" ] ; then
execlist="$execlist ocp-enb" execlist="$execlist ocp-enb"
fi fi
if [ "$gNB" = "1" ] ; then if [ "$gNB" = "1" ] ; then
execlist="$execlist nr-softmodem" execlist="$execlist nr-softmodem"
fi fi
if [ "$RU" = "1" ] ; then if [ "$RU" = "1" ] ; then
execlist="$execlist oairu" execlist="$execlist oairu"
fi fi
if [ "$UE" = 1 ] ; then if [ "$UE" = 1 ] ; then
execlist="$execlist lte-uesoftmodem" execlist="$execlist lte-uesoftmodem"
fi fi
if [ "$nrUE" = 1 ] ; then if [ "$nrUE" = 1 ] ; then
execlist="$execlist nr-uesoftmodem" execlist="$execlist nr-uesoftmodem"
fi fi
if [ "$ittiSIM" = "1" ] ; then if [ "$ittiSIM" = "1" ] ; then
execlist="$execlist nr-ittisim" execlist="$execlist nr-ittisim"
fi fi
for f in $execlist ; do for f in $execlist ; do
echo_info "Compiling $f..." echo_info "Compiling $f..."
compilations \ compilations \
$build_dir $f \ $build_dir $f \
$f $dbin/$f.$REL $f $dbin/$f.$REL
done done
# mandatory shared libraries common to UE and (e/g)NB # mandatory shared libraries common to UE and (e/g)NB
if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then
echo_info "Building shared libraries common to UE and gNB" echo_info "Building shared libraries common to UE and gNB"
compilations \
$build_dir $config_libconfig_shlib \
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
compilations \ compilations \
$build_dir $config_libconfig_shlib \
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
compilations \
$build_dir coding \ $build_dir coding \
libcoding.so $dbin/libcoding.so libcoding.so $dbin/libcoding.so
fi
fi fi
if [ "$UE" = 1 ] ; then if [ "$UE" = 1 ] ; then
echo_info "Compiling UE specific part" echo_info "Compiling UE specific part"
...@@ -724,11 +721,8 @@ function main() { ...@@ -724,11 +721,8 @@ function main() {
fi fi
fi fi
if [ "$SIMUS_PHY" = "1" -o "$SIMUS_CORE" = "1" ] ; then cd $DIR/$build_dir/build
cd $DIR/$build_dir/build
eval $CMAKE_CMD
fi
################## ##################
# PHY simulators # # PHY simulators #
################## ##################
......
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