From 6160ab14be471b91e720a7c3ac89cfde5e6aecd4 Mon Sep 17 00:00:00 2001
From: Robert Schmidt <robert.schmidt@openairinterface.org>
Date: Mon, 19 Sep 2022 10:15:35 +0200
Subject: [PATCH] Remove targets/bin/

---
 ci-scripts/cls_oaicitest.py                   |   2 +-
 ci-scripts/runTestOnVM.sh                     |   8 +-
 cmake_targets/at_commands/CMakeLists.txt      |   1 -
 .../autotests/run_exec_autotests.bash         |  14 +-
 cmake_targets/autotests/test_case_list.xml    |  24 ++--
 cmake_targets/build_oai                       | 122 ++++--------------
 cmake_targets/tools/build_helper              |  12 --
 cmake_targets/tools/init_nas_nos1             |   6 +-
 cmake_targets/tools/init_nas_s1               |   2 +-
 cmake_targets/tools/perf_oai.bash             |   2 +-
 common/utils/telnetsrv/DOC/telnetusage.md     |   2 +-
 doc/BUILD.md                                  |  35 +----
 doc/d2d_emulator_setup.txt                    |   5 +-
 docker/Dockerfile.eNB.rhel8.2                 |   4 +-
 docker/Dockerfile.eNB.ubuntu18                |   4 +-
 docker/Dockerfile.gNB.rhel8.2                 |   4 +-
 docker/Dockerfile.gNB.ubuntu18                |   4 +-
 docker/Dockerfile.lteRU.rhel8.2               |   4 +-
 docker/Dockerfile.lteRU.ubuntu18              |   4 +-
 docker/Dockerfile.lteUE.rhel8.2               |  10 +-
 docker/Dockerfile.lteUE.ubuntu18              |  10 +-
 docker/Dockerfile.nrUE.rhel8.2                |   4 +-
 docker/Dockerfile.nrUE.ubuntu18               |   4 +-
 docker/Dockerfile.phySim.rhel8.2              |  28 ++--
 docker/README.md                              |   4 +-
 .../SYRTEM_IQ_QuickStart.readme               |   4 +-
 sdr/rfsimulator/README.md                     |   2 +-
 27 files changed, 108 insertions(+), 217 deletions(-)

diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index fcaa22afed0..6977ab3bbe4 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -526,7 +526,7 @@ class OaiCiTest():
 				else:
 					SSH.command('sed -e "s#93#92#" -e "s#8baf473f2f8fd09487cccbd7097c6862#fec86ba6eb707ed08905757b1bb44b8f#" -e "s#e734f8734007d6c5ce7a0508809e7e9c#C42449363BBAD02B66D16BC975D77CC1#" ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf > ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf', '\$', 5)
 				SSH.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf .u*', '\$', 5)
-				SSH.command('echo ' + self.UEPassword + ' | sudo -S ../../../targets/bin/conf2uedata -c ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf -o .', '\$', 5)
+				SSH.command('echo ' + self.UEPassword + ' | sudo -S conf2uedata -c ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf -o .', '\$', 5)
 		else:
 			SSH.command('if [ -e rbconfig.raw ]; then echo ' + self.UEPassword + ' | sudo -S rm rbconfig.raw; fi', '\$', 5)
 			SSH.command('if [ -e reconfig.raw ]; then echo ' + self.UEPassword + ' | sudo -S rm reconfig.raw; fi', '\$', 5)
diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh
index b596680eb3f..2739980238a 100755
--- a/ci-scripts/runTestOnVM.sh
+++ b/ci-scripts/runTestOnVM.sh
@@ -712,11 +712,11 @@ function add_ue_l2_sim_ue {
     echo "sudo rm -f *.u*" >> $1
     if [ $LOC_NB_UES -eq 1 ]
     then
-        echo "echo \"sudo ../../../targets/bin/conf2uedata -c ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o .\"" >> $1
-        echo "sudo ../../../targets/bin/conf2uedata -c ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o . > /home/ubuntu/tmp/cmake_targets/log/ue_adapt.txt 2>&1" >> $1
+        echo "echo \"sudo conf2uedata -c ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o .\"" >> $1
+        echo "sudo conf2uedata -c ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o . > /home/ubuntu/tmp/cmake_targets/log/ue_adapt.txt 2>&1" >> $1
     else
-        echo "echo \"sudo ../../../targets/bin/conf2uedata -c ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr_multi_ues.conf -o .\"" >> $1
-        echo "sudo ../../../targets/bin/conf2uedata -c ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr_multi_ues.conf -o . > /home/ubuntu/tmp/cmake_targets/log/ue_adapt.txt 2>&1" >> $1
+        echo "echo \"sudo conf2uedata -c ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr_multi_ues.conf -o .\"" >> $1
+        echo "sudo conf2uedata -c ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr_multi_ues.conf -o . > /home/ubuntu/tmp/cmake_targets/log/ue_adapt.txt 2>&1" >> $1
     fi
 
     ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_UE_VM_IP_ADDR < $1
diff --git a/cmake_targets/at_commands/CMakeLists.txt b/cmake_targets/at_commands/CMakeLists.txt
index dc91f3c31c9..a8f5932045c 100755
--- a/cmake_targets/at_commands/CMakeLists.txt
+++ b/cmake_targets/at_commands/CMakeLists.txt
@@ -46,7 +46,6 @@ set(OPENAIR3_DIR          ${OPENAIR_DIR}/openair3)
 set(OPENAIR3_DIR         ${OPENAIR_DIR}/openair3)
 set(OPENAIR_TARGETS       ${OPENAIR_DIR}/targets)
 set(OPENAIR_CMAKE_SCRIPTS ${OPENAIR_DIR}/cmake_targets/tools)
-set(OPENAIR_BIN_DIR       ${OPENAIR_DIR}/targets/bin)
 set(OPENAIR_NAS_DIR       ${OPENAIR_DIR}/openair3/NAS)
 
 
diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash
index 895bd9554b7..176d275ec80 100755
--- a/cmake_targets/autotests/run_exec_autotests.bash
+++ b/cmake_targets/autotests/run_exec_autotests.bash
@@ -394,17 +394,19 @@ function test_compile_and_run() {
 
 dbin=$OPENAIR_DIR/cmake_targets/autotests/bin
 dlog=$OPENAIR_DIR/cmake_targets/autotests/log
-
+exec_dir=$OPENAIR_DIR/cmake_targets/ran_build/build
 
 function print_help() {
  echo_info '
 This program runs automated test case system for OpenAirInterface
 You should have ubuntu 14.xx, updated, and the Linux kernel >= 3.14
 Options
--h | --help
-   This help
+-d | --exec-dir
+   Set directory of executables (default: $exec_dir)
 -g | --run-group
    Run test cases in a group. For example, ./run_exec_autotests "0101* 010102"
+-h | --help
+   This help
 -p
    Use password for logging
 -np | --no-password
@@ -451,6 +453,10 @@ until [ -z "$1" ]
             BYPASS_COMPILE=1
             echo "bypass option ON"
             shift ;;
+        -d|--exec-dir)
+            exec_dir=$2
+            echo "setting execdir to $exec_dir"
+            shift 2;;
         -h | --help)
             print_help
             exit 1;;
@@ -535,7 +541,7 @@ for search_expr in "${test_case_array[@]}"
     compile_prog_args=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/compile_prog_args" $xml_conf`
     pre_exec=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/pre_exec" $xml_conf`
     pre_exec_args=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/pre_exec_args" $xml_conf`
-    main_exec=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/main_exec" $xml_conf`
+    main_exec=$exec_dir/`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/main_exec" $xml_conf`
     main_exec_args=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/main_exec_args" $xml_conf`
     search_expr_true=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/search_expr_true" $xml_conf`
     search_expr_false=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/search_expr_false" $xml_conf`
diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml
index 080a424f29d..405fab0c25a 100755
--- a/cmake_targets/autotests/test_case_list.xml
+++ b/cmake_targets/autotests/test_case_list.xml
@@ -22,7 +22,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/dlsim.Rel15</main_exec>
+      <main_exec>dlsim</main_exec>
       <main_exec_args> -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
                        -m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60
                        -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
@@ -56,7 +56,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/ulsim.Rel15</main_exec>
+      <main_exec>ulsim</main_exec>
       <main_exec_args> -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 
                        -BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 
                        -BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70  
@@ -86,7 +86,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/ldpctest.Rel15</main_exec>
+      <main_exec>ldpctest</main_exec>
       <main_exec_args>-l3872 -s10 -n100
                       -l4224 -s10 -n100
 		              -l4576 -s10 -n100
@@ -114,7 +114,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/polartest.Rel15</main_exec>
+      <main_exec>polartest</main_exec>
       <main_exec_args>-q -s-10 -f0
                       -q -s-10 -f0 -m1
                       -q -s-2 -f2 -m2 -k12
@@ -139,7 +139,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/nr_pbchsim.Rel15</main_exec>
+      <main_exec>nr_pbchsim</main_exec>
       <main_exec_args>-s-11 -S-8 -n10 -R106
                       -s-11 -S-8 -n10 -o8000 -I -R106
                       -s-11 -S-8 -n10 -R217
@@ -184,7 +184,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/nr_dlsim.Rel15</main_exec>
+      <main_exec>nr_dlsim</main_exec>
       <main_exec_args>-n100 -R106 -b106 -s5
 		  -n100 -R217 -b217 -s5
 		  -n100 -R273 -b273 -s5
@@ -225,7 +225,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/nr_dlschsim.Rel15</main_exec>
+      <main_exec>nr_dlschsim</main_exec>
       <main_exec_args>-R 106 -m9 -s13 -n100
                       -R 217 -m15 -s15 -n100
                       -R 273 -m19 -s20 -n100</main_exec_args>
@@ -246,7 +246,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/smallblocktest.Rel15</main_exec>
+      <main_exec>smallblocktest</main_exec>
       <main_exec_args>-l 3 -s -4 -d 1 -i 10000
                       -l 6 -s -4 -d 1 -i 10000
                       -l 7 -s -4 -d 1 -i 10000
@@ -269,7 +269,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/nr_ulschsim.Rel15</main_exec>
+      <main_exec>nr_ulschsim</main_exec>
       <main_exec_args>-R 106 -m9 -s13 -n100
                       -R 217 -m15 -s15 -n100
                       -R 273 -m19 -s20 -n100
@@ -304,7 +304,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/nr_pucchsim.Rel15</main_exec>
+      <main_exec>nr_pucchsim</main_exec>
       <main_exec_args>-R 106 -i 1 -P 0 -b 1 -s-2 -n1000
                       -R 106 -i 1 -P 0 -b 2 -s-2 -n1000
 		      -R 106 -i 1 -P 0 -b 2 -s-2 -c -n1000
@@ -395,7 +395,7 @@
       <compile_prog_args> --phy_simulators  -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/nr_ulsim.Rel15</main_exec>
+      <main_exec>nr_ulsim</main_exec>
       <main_exec_args>-n100 -m9 -r106 -s5
                       -n100 -m16 -s10
                       -n100 -m28 -s20
@@ -439,7 +439,7 @@
       <compile_prog_args> --phy_simulators -c </compile_prog_args>
       <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
       <pre_exec_args></pre_exec_args>
-      <main_exec> $OPENAIR_DIR/targets/bin/nr_prachsim.Rel15</main_exec>
+      <main_exec>nr_prachsim</main_exec>
       <main_exec_args>-a -s -30 -n 100 -p 63 -R 106
                       -a -s -30 -n 100 -p 63 -R 217
                       -a -s -30 -n 100 -p 63 -R 273
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index ac15f586629..1ff3c28991d 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -34,7 +34,7 @@ source "$THIS_SCRIPT_PATH"/tools/build_helper
 set_openair_env
 
 # Variables for UE data generation
-gen_nvram_path=$OPENAIR_DIR/targets/bin
+gen_nvram_path=$OPENAIR_DIR/cmake_targets/ran_build/build
 conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
 
 XFORMS="True"
@@ -537,9 +537,8 @@ function main() {
     echo_info "Erased all previously producted files"
   fi
 
-  dbin=$OPENAIR_DIR/targets/bin
   dlog=$OPENAIR_DIR/cmake_targets/log
-  mkdir -p $dbin $dlog
+  mkdir -p $dlog
 
   if [ "$INSTALL_EXTERNAL" = "1" ] ; then
     echo_info "Installing packages"
@@ -622,9 +621,7 @@ function main() {
   
   for f in $execlist ; do
       echo_info "Compiling $f..."
-      compilations \
-          $BUILD_DIR $f \
-          $f $dbin/$f.$REL
+      compilations $BUILD_DIR $f
   done
   
   
@@ -636,13 +633,9 @@ function main() {
       # configuration module libraries, one currently available, using libconfig
       config_libconfig_shlib=params_libconfig
       
-      compilations \
-          $BUILD_DIR $config_libconfig_shlib \
-          lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
+      compilations $BUILD_DIR $config_libconfig_shlib
       
-      compilations \
-          $BUILD_DIR coding \
-          libcoding.so $dbin/libcoding.so
+      compilations $BUILD_DIR coding
       
   fi
   
@@ -653,9 +646,7 @@ function main() {
     if [ $IS_CONTAINER -eq 0 ]
     then
       echo_info "Building ue_ip module"
-      compilations \
-        $BUILD_DIR ue_ip \
-        CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
+      compilations $BUILD_DIR ue_ip
     else
       echo_info "Bypassing ue_ip build"
     fi #IS_CONTAINER
@@ -663,32 +654,20 @@ function main() {
 #    mkdir -p $DIR/at_commands/build
 #    cd $DIR/at_commands/build
 #    eval $CMAKE_CMD
-#    compilations \
-#      at_commands at_nas_ue \
-#      at_nas_ue $dbin/at_nas_ue
+#    compilations at_commands at_nas_ue
 
     [ "$CLEAN" = "1" ] && rm -rf $DIR/nas_sim_tools/build
     mkdir -p $DIR/nas_sim_tools/build
     cd $DIR/nas_sim_tools/build
 
     eval $CMAKE_CMD ..
-    compilations \
-      nas_sim_tools usim \
-      usim $dbin/usim
-    compilations \
-      nas_sim_tools nvram \
-      nvram $dbin/nvram
-    compilations \
-      nas_sim_tools conf2uedata \
-      conf2uedata $dbin/conf2uedata
+    compilations nas_sim_tools usim
+    compilations nas_sim_tools nvram
+    compilations nas_sim_tools conf2uedata
 
     # generate USIM data
     if [ -f $dbin/conf2uedata ]; then
-      install_nas_tools $conf_nvram_path $gen_nvram_path "$dlog/conf2uedata.txt"
-      echo_info "Copying UE specific part to $DIR/$BUILD_DIR/build"
-      cp -Rvf $dbin/.ue_emm.nvram0 $DIR/$BUILD_DIR/build
-      cp -Rvf $dbin/.ue.nvram0 $DIR/$BUILD_DIR/build
-      cp -Rvf $dbin/.usim.nvram0 $DIR/$BUILD_DIR/build
+      install_nas_tools $conf_nvram_path $DIR/$BUILD_DIR/build "$DIR/$BUILD_DIR/build/conf2uedata.txt"
     else
       echo_warning "not generated UE NAS files: binaries not found"
     fi
@@ -705,13 +684,9 @@ function main() {
     simlist="dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
 	# simlist="ldpctest"
     for f in $simlist ; do
-      compilations \
-        $BUILD_DIR $f \
-	    $f $dbin/$f.$REL
+      compilations $BUILD_DIR $f
     done
-    compilations \
-      $BUILD_DIR coding \
-      libcoding.so $dbin/libcoding.so
+    compilations $BUILD_DIR coding
   fi
 
   ###################
@@ -721,9 +696,7 @@ function main() {
     echo_info "Compiling security unitary tests simulators"
     simlist="secu_knas_encrypt_eia1 secu_kenb aes128_ctr_encrypt aes128_ctr_decrypt secu_knas_encrypt_eea2 secu_knas secu_knas_encrypt_eea1 kdf aes128_cmac_encrypt secu_knas_encrypt_eia2"
     for f in $simlist ; do
-      compilations \
-	    $BUILD_DIR test_$f \
-	    test_$f $dbin/test_$f.$REL
+      compilations $BUILD_DIR test_$f
     done
   fi
 
@@ -732,21 +705,15 @@ function main() {
   ####################################
   if [ "$HW" = "EXMIMO" ] ; then
     echo_info "Compiling Express MIMO 2 board drivers"
-    compilations \
-      $BUILD_DIR openair_rf \
-      CMakeFiles/openair_rf/openair_rf.ko $dbin/openair_rf.ko
-    compilations \
-	  $BUILD_DIR updatefw \
-	  updatefw $dbin/updatefw
+    compilations $BUILD_DIR openair_rf
+    compilations $BUILD_DIR updatefw
     echo_info "Compiling oarf tools. The logfile for compilation is here: $dlog/oarf.txt"
     make -C $OPENAIR_DIR/cmake_targets/$BUILD_DIR/build oarf > $dlog/oarf.txt 2>&1
-    cp $OPENAIR_DIR/cmake_targets/$BUILD_DIR/build/*.oct $dbin
-    if [ -s $dbin/oarf_config_exmimo.oct ] ; then
+    if [ -s $OPENAIR_DIR/cmake_targets/$BUILD_DIR/build/oarf_config_exmimo.oct ] ; then
 	  echo_success "oarf tools compiled"
     else
 	  echo_error "oarf tools compilation failed"
     fi
-    cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
   fi
   
   ######################
@@ -754,9 +721,7 @@ function main() {
   ######################
   if [ ! -z "$BUILD_OPTLIB" ] ; then 
      for oklib in $BUILD_OPTLIB ; do
-         compilations \
-             $BUILD_DIR $oklib \
-             lib${oklib}.so $dbin/lib${oklib}.so
+         compilations $BUILD_DIR $oklib
      done
   fi
   
@@ -768,52 +733,36 @@ function main() {
       # build RF device libraries
       if [ "$HW" != "None" ] ; then
           rm -f liboai_device.so
-          rm -f $dbin/liboai_device.so
 
           # link liboai_device.so with the selected RF device library
           if [ "$HW" == "EXMIMO" ] ; then
-              compilations \
-                  $BUILD_DIR oai_exmimodevif \
-                  liboai_exmimodevif.so $dbin/liboai_exmimodevif.so.$REL
+              compilations $BUILD_DIR oai_exmimodevif
 
               ln -sf liboai_exmimodevif.so liboai_device.so
-              ln -sf $dbin/liboai_exmimodevif.so.$REL $dbin/liboai_device.so
               echo_info "liboai_device.so is linked to EXMIMO device library"
           elif [ "$HW" == "OAI_USRP" ] ; then
-              compilations \
-                  $BUILD_DIR oai_usrpdevif \
-                  liboai_usrpdevif.so $dbin/liboai_usrpdevif.so.$REL
+              compilations $BUILD_DIR oai_usrpdevif
 
               ln -sf liboai_usrpdevif.so liboai_device.so
-              ln -sf $dbin/liboai_usrpdevif.so.$REL $dbin/liboai_device.so
               echo_info "liboai_device.so is linked to USRP device library"        
           elif [ "$HW" == "OAI_BLADERF" ] ; then
               if [ -f "/usr/include/libbladeRF.h" ] ; then
-                  compilations \
-                      $BUILD_DIR oai_bladerfdevif \
-                      liboai_bladerfdevif.so $dbin/liboai_bladerfdevif.so.$REL
+                  compilations $BUILD_DIR oai_bladerfdevif
               fi
 
               ln -sf liboai_bladerfdevif.so liboai_device.so
-              ln -sf $dbin/liboai_bladerfdevif.so.$REL $dbin/liboai_device.so
               echo_info "liboai_device.so is linked to BLADERF device library"	 
           elif [ "$HW" == "OAI_LMSSDR" ] ; then
 #              if [ -f "/usr/include/libbladeRF.h" ] ; then
-                  compilations \
-                      $BUILD_DIR oai_lmssdrdevif \
-                      liboai_lmssdrdevif.so $dbin/liboai_lmssdrdevif.so.$REL
+                  compilations $BUILD_DIR oai_lmssdrdevif
 #              fi
 
               ln -sf liboai_lmssdrdevif.so liboai_device.so
-              ln -sf $dbin/liboai_lmssdrdevif.so.$REL $dbin/liboai_device.so
               echo_info "liboai_device.so is linked to LMSSDR device library"	 
           elif [ "$HW" == "OAI_IRIS" ] ; then
-              compilations \
-                  $BUILD_DIR oai_irisdevif \
-                  liboai_irisdevif.so $dbin/liboai_irisdevif.so.$REL
+              compilations $BUILD_DIR oai_irisdevif
 
               ln -s liboai_irisdevif.so liboai_device.so
-              ln -s $dbin/liboai_irisdevif.so.$REL $dbin/liboai_device.so
               echo_info "liboai_device.so is linked to IRIS device library"
           elif [ "$HW" == "OAI_ADRV9371_ZC706" ] ; then
               SYRIQ_KVER=$(uname -r)
@@ -828,12 +777,9 @@ function main() {
               fi
               echo_info "liboai_device.so is linked to ADRV9371_ZC706 device library for Kernel $SYRIQ_KMAJ.$SYRIQ_KMIN"
           elif [ "$HW" == "OAI_AW2SORI" ] ; then
-	      compilations \
-		  $BUILD_DIR aw2sori_transpro \
-                  libaw2sori_transpro.so $dbin/libaw2sori_transpro.so.$REL 
+              compilations $BUILD_DIR aw2sori_transpro
 
               ln -sf libaw2sori_transpro.so libthirdparty_transpro.so
-              ln -sf $dbin/libaw2sori_transpro.so.$REL $dbin/libaw2sori_transpro.so
               echo_info "build libthirdparty_transpro.so for AW2SORI fronthaul"
           else
               echo_info "liboai_device.so is not linked to any device library"
@@ -843,38 +789,26 @@ function main() {
       #build simulators devices
       if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then
           echo_info "Compiling rfsimulator"
-          compilations \
-              $BUILD_DIR rfsimulator \
-              librfsimulator.so $dbin/librfsimulator.so.$REL
+          compilations $BUILD_DIR rfsimulator
       fi
 
       #build transport protocol libraries (currently only ETHERNET is available)
       if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then
           echo_info "Building transport protocol libraries"
           rm -f liboai_transpro.so
-          rm -f $dbin/liboai_transpro.so
 	  if [ "$TP" == "Ethernet" ]; then
-              compilations \
-		  $BUILD_DIR oai_eth_transpro \
-		  liboai_eth_transpro.so $dbin/liboai_eth_transpro.so.$REL
+              compilations $BUILD_DIR oai_eth_transpro
               ln -sf liboai_eth_transpro.so liboai_transpro.so
-              ln -sf $dbin/liboai_eth_transpro.so.$REL $dbin/liboai_transpro.so
               echo_info "liboai_transpro.so is linked to ETHERNET transport"
 	  fi
 	  if [ "$TP" == "benetel4g" ]; then
-              compilations \
-		  $BUILD_DIR benetel_4g \
-		  libbenetel_4g.so $dbin/libbenetel_4g.$REL
+              compilations $BUILD_DIR benetel_4g
               ln -sf libbenetel_4g.so liboai_transpro.so
-              ln -sf $dbin/libbenetel_4g.so.$REL $dbin/liboai_transpro.so
               echo_info "liboai_transpro.so is linked to BENETEL4G transport"
 	  fi
 	  if [ "$TP" == "benetel5g" ]; then
-              compilations \
-		  $BUILD_DIR benetel_5g \
-		  libbenetel_5g.so $dbin/libbenetel_5g.$REL
+              compilations $BUILD_DIR benetel_5g
               ln -sf libbenetel_5g.so liboai_transpro.so
-              ln -sf $dbin/libbenetel_5g.so.$REL $dbin/liboai_transpro.so
               echo_info "liboai_transpro.so is linked to BENETEL4G transport"
 	  fi
       fi
diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index f4e206d0eb1..3fd503a0119 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -166,7 +166,6 @@ clean_kernel() {
 clean_all_files() {
  set_openair_env
  dir=$OPENAIR_DIR/cmake_targets
- rm -rf $dir/log $OPENAIR_DIR/targets/bin/*
  rm -rf $dir/ran_build $dir/ran_build_noLOG
  rm -rf $dir/lte-simulators/build 
  rm -rf $dir/nas_sim_tools/build 
@@ -237,17 +236,6 @@ compilations() {
      echo_error "$2 compilation failed"
      exit 1
   fi
-  if [ -s "$3" ] ; then
-     rm -f "$4"
-     ln -s "$PWD/$3" "$4"
-     echo_success "$2 compiled"
-     check_warnings "$dlog/$2.$REL.txt"
-  else
-     check_warnings "$dlog/$2.$REL.txt"
-     check_errors "$dlog/$2.$REL.txt"
-     echo_error "$2 compilation failed"
-     exit 1
-  fi
 }
 
 ############################################
diff --git a/cmake_targets/tools/init_nas_nos1 b/cmake_targets/tools/init_nas_nos1
index 5766020d706..a94639026a5 100755
--- a/cmake_targets/tools/init_nas_nos1
+++ b/cmake_targets/tools/init_nas_nos1
@@ -39,16 +39,16 @@ load_module() {
   sudo insmod $1
 }
 
-load_module $OPENAIR_DIR/targets/bin/nasmesh.ko
+load_module $OPENAIR_DIR/cmake_targets/ran_build/build/nasmesh.ko
 
 if [ "$1" = "eNB" ]; then 
      echo "bring up oai0 interface for enb"
      sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
-     $OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
+     $OPENAIR_DIR/cmake_targets/ran_build/build/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
 else
     if [ "$1" = "UE" ]; then 
        echo "bring up oai0 interface for UE"
        sudo ifconfig oai0 10.0.1.2 netmask 255.255.255.0 broadcast 10.0.1.255
-       $OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.2 -t 10.0.1.1 -r 1
+       $OPENAIR_DIR/cmake_targets/ran_build/build/rb_tool -a -c0 -i0 -z0 -s 10.0.1.2 -t 10.0.1.1 -r 1
     fi
 fi  
diff --git a/cmake_targets/tools/init_nas_s1 b/cmake_targets/tools/init_nas_s1
index b78ab34ff9f..deee97634ce 100755
--- a/cmake_targets/tools/init_nas_s1
+++ b/cmake_targets/tools/init_nas_s1
@@ -48,7 +48,7 @@ load_module() {
   sudo insmod $1
 }
 
-load_module ../../targets/bin/ue_ip.ko
+load_module ../ran_build/build/ue_ip.ko
 
 if [ "$1" = "UE" ]; then
   echo "bring up $LTEIF interface for UE"
diff --git a/cmake_targets/tools/perf_oai.bash b/cmake_targets/tools/perf_oai.bash
index cd1ef5a4000..4da62b46560 100755
--- a/cmake_targets/tools/perf_oai.bash
+++ b/cmake_targets/tools/perf_oai.bash
@@ -290,7 +290,7 @@ oaisim_otg_stats(){
     $SUDO rmmod nasmesh > /dev/null 2>&1
     
     echo_success "Bringup UE interface..."
-    $SUDO insmod  $OPENAIR_DIR/targets/bin/nasmesh.ko
+    $SUDO insmod  $OPENAIR_DIR/cmake_targets/ran_build/build/nasmesh.ko
     sync
 
     if [ ! -f $OAISIM_EXEC ]; then 
diff --git a/common/utils/telnetsrv/DOC/telnetusage.md b/common/utils/telnetsrv/DOC/telnetusage.md
index c4777ce0d8c..8b8179fa2b4 100644
--- a/common/utils/telnetsrv/DOC/telnetusage.md
+++ b/common/utils/telnetsrv/DOC/telnetusage.md
@@ -8,7 +8,7 @@ By default the embedded telnet server, which is implemented in a shared library,
  ./build_oai  --build-lib telnetsrv
 ```
 
-This will create the `libtelnetsrv.so` and `libtelnetsrv_<app> file in the `targets/bin` and `cmake_targets/ran_build/build` sub directories of the oai repository. <app> can be "enb", "gnb", "4GUE" or "5GUE", each library containing functions specific to a given executable.
+This will create the `libtelnetsrv.so` and `libtelnetsrv_<app> file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. <app> can be "enb", "gnb", "4GUE" or "5GUE", each library containing functions specific to a given executable.
 
 When starting the softmodem, you must specify the **_\-\-telnetsrv_** option to load and start the telnet server. The telnet server is loaded via the [oai shared library loader](loader).
 
diff --git a/doc/BUILD.md b/doc/BUILD.md
index dee55599cc5..4f73f21b456 100644
--- a/doc/BUILD.md
+++ b/doc/BUILD.md
@@ -144,40 +144,7 @@ Using the help option of the build script you can get the list of available opti
 
 # `build_oai` options
 
-| Option                                                      | Status                                      | Description                                                  |
-| ----------------------------------------------------------- | ------------------------------------------- | :----------------------------------------------------------- |
-| -h                                                          | maintained                                  | get help                                                     |
-| -c                                                          | maintained                                  | erase all previously built files for this target before starting the new build. |
-| -C                                                          | maintained, needs improvement               | erase all previously built files for any target before starting the new build. |
-| --verbose-compile                                           | maintained                                  | get compilation messages, as when running `make` or `gcc` directly. |
-| --cflags_processor                                          | maintained                                  | used to pass options to the compiler.                        |
-| --clean-kernel                                              | unknown                                     | no code in the script corresponding to this option           |
-| --install-system-files                                      | maintained                                  | install oai built binaries in linux system files repositories |
-| -w                                                          | maintained and tested in CI for USRP device | build corresponding oai device and create the soft link to enforce this device usage at run-time |
-| --phy_simulators                                            | maintained, tested in CI                    | build all PHY simulators, a set of executables allowing unitary tests of LTE and 5G channel implementation within oai. |
-| --core_simulators                                           |                                             |                                                              |
-| -s                                                          |                                             |                                                              |
-| --run-group                                                 |                                             |                                                              |
-| -I                                                          | maintained, tested in CI                    | install external dependencies before starting the build      |
-| --install-optional-packages                                 | maintained                                  | install optional packages, useful for developing and testing. look at the check_install_additional_tools function in cmake_targets/tools/build_helper script to get the list |
-| -g                                                          | maintained                                  | Specifies the level of debugging options used to build the binaries. Available levels are `Release`, `RelWithDebInfo`, `MinSizeRe` and `Debug`. If -g is not specified, `Release` is used, if -g is used without any level, `Debug` is used. |
-| -G                                                          | maintained                                  | Display Cmake debugging messages                             |
-| --eNB                                                       | maintained and tested in CI                 | build `lte-softmodem` the LTE eNodeB                         |
-| --UE                                                        | maintained and tested in CI                 | build `lte-uesoftmodem` the LTE UE                           |
-| --gNB                                                       | maintained and tested in CI                 | build `nr-softmodem` the 5G gNodeB                           |
-| --nrUE                                                      | maintained and tested in CI                 | build `nr-uesoftmodem` the 5G UE                             |
-| --arch-native                                               | maintained                                  | build with native architecture optimization                  |
-| --usrp-recplay                                              | deprecated                                  | use the USRP configuration parameters to use the record player. |
-| --build-lib                                                 | maintained                                  | build  optional shared library(ies), which can then be loaded at run time via command line option. Use the --help option to get the list of supported optional libraries. `all` can be used to build all available optional libraries. |
-| --UE-conf-nvram                                             | maintained                                  | Specifies the path to the input file used by the conf2uedata utility. defaults to [openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf](../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf) |
-| --UE-gen-nvram                                              | maintained                                  | Specifies the path where the output file created by the conf2uedata utility will be placed. Defaults to `target/bin` |
-| -V                                                          | deprecated                                  | Used to build with support for synchronization diagram utility. This is now available via the T-Tracer and is included if T-Tracer is not disabled. |
-| --build-doxygen                                             | unknown                                     | build doxygen documentation, many oai source files do not include doxygen comments |
-| --disable-deadline --enable-deadline --disable-cpu-affinity | deprecated                                  | These options were used to activate or de-activate specific code depending on the choice of a specific linux scheduling  mode. This has not been tested for a while and should be implemented as configuration options |
-| --disable-T-Tracer                                          | maintained, to be tested                    | Remove T_Tracer and console LOG messages except error messages. |
-| --ue-autotest-trace --ue-timing --ue-trace                  | deprecated                                  | Were used to enable conditional code implementing debugging messages or debugging statistics. These functionalities are now either available from run-time options or not maintained. |
-| --build-eclipse                                             | unknown                                     |                                                              |
-|                                                             |                                             |                                                              |
+Please run `./build_oai -h` to get a list of available options.
 
 [oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
 
diff --git a/doc/d2d_emulator_setup.txt b/doc/d2d_emulator_setup.txt
index 9b3393c6bf3..fe26e3f9d1e 100644
--- a/doc/d2d_emulator_setup.txt
+++ b/doc/d2d_emulator_setup.txt
@@ -27,12 +27,9 @@ Validate that there are no errors
 OAI build/execute
  - export NFAPI_DIR=XXX (place where NFAPI was installed)
  - cd cmake_targets
- - ./build_oai --UE
+ - ./build_oai --UE --ninja
  (if necessary, use ./build_oai -I --UE to install required packages)
  - cd ran_build/build/
- - cp ../../../targets/bin/.ue* .
- - cp ../../../targets/bin/.usim* .
- - sudo insmod ../../../targets/bin/ue_ip.ko
 
 UE1: 
  - sudo ifconfig oip0 10.0.0.1
diff --git a/docker/Dockerfile.eNB.rhel8.2 b/docker/Dockerfile.eNB.rhel8.2
index 23afb5f38d8..cc4501b66b8 100644
--- a/docker/Dockerfile.eNB.rhel8.2
+++ b/docker/Dockerfile.eNB.rhel8.2
@@ -57,7 +57,7 @@ RUN yum update -y && \
 
 WORKDIR /opt/oai-enb/bin
 COPY --from=enb-build \
-    /oai-ran/targets/bin/lte-softmodem.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/lte-softmodem \
     /oai-ran/docker/scripts/entrypoint.sh \
     ./
 
@@ -119,4 +119,4 @@ WORKDIR /opt/oai-enb
 EXPOSE 2152/udp 36412/udp 36422/udp
 
 ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
-CMD ["/opt/oai-enb/bin/lte-softmodem.Rel15", "-O", "/opt/oai-enb/etc/enb.conf"]
+CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
diff --git a/docker/Dockerfile.eNB.ubuntu18 b/docker/Dockerfile.eNB.ubuntu18
index 2b50dcadfbe..172d04943aa 100644
--- a/docker/Dockerfile.eNB.ubuntu18
+++ b/docker/Dockerfile.eNB.ubuntu18
@@ -64,7 +64,7 @@ RUN apt-get update && \
 
 WORKDIR /opt/oai-enb/bin
 COPY --from=enb-build \
-    /oai-ran/targets/bin/lte-softmodem.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/lte-softmodem \
     /oai-ran/docker/scripts/entrypoint.sh \
     ./
 
@@ -115,4 +115,4 @@ EXPOSE 2152/udp 36412/udp 36422/udp
 #EXPOSE 50001/udp # IF5 / ECPRI (data)
 
 ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
-CMD ["/opt/oai-enb/bin/lte-softmodem.Rel15", "-O", "/opt/oai-enb/etc/enb.conf"]
+CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
diff --git a/docker/Dockerfile.gNB.rhel8.2 b/docker/Dockerfile.gNB.rhel8.2
index f782384f58d..6420b469d45 100644
--- a/docker/Dockerfile.gNB.rhel8.2
+++ b/docker/Dockerfile.gNB.rhel8.2
@@ -59,7 +59,7 @@ RUN yum repolist --disablerepo=* && \
 
 WORKDIR /opt/oai-gnb/bin
 COPY --from=gnb-build \
-    /oai-ran/targets/bin/nr-softmodem.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/nr-softmodem \
     /oai-ran/docker/scripts/entrypoint.sh \
     ./
 
@@ -124,4 +124,4 @@ WORKDIR /opt/oai-gnb
 #EXPOSE 50001/udp # IF5 / ECPRI (data)
 
 ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
-CMD ["/opt/oai-gnb/bin/nr-softmodem.Rel15", "-O", "/opt/oai-gnb/etc/gnb.conf"]
+CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
diff --git a/docker/Dockerfile.gNB.ubuntu18 b/docker/Dockerfile.gNB.ubuntu18
index 11669c2af42..5c38e8ccefc 100644
--- a/docker/Dockerfile.gNB.ubuntu18
+++ b/docker/Dockerfile.gNB.ubuntu18
@@ -63,7 +63,7 @@ RUN apt-get update && \
 
 WORKDIR /opt/oai-gnb/bin
 COPY --from=gnb-build \
-    /oai-ran/targets/bin/nr-softmodem.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/nr-softmodem \
     /oai-ran/docker/scripts/entrypoint.sh \
     ./
 
@@ -114,4 +114,4 @@ WORKDIR /opt/oai-gnb
 #EXPOSE 50001/udp # IF5 / ECPRI (data)
 
 ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
-CMD ["/opt/oai-gnb/bin/nr-softmodem.Rel15", "-O", "/opt/oai-gnb/etc/gnb.conf"]
+CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
diff --git a/docker/Dockerfile.lteRU.rhel8.2 b/docker/Dockerfile.lteRU.rhel8.2
index f20910ff510..338a15c9cf4 100644
--- a/docker/Dockerfile.lteRU.rhel8.2
+++ b/docker/Dockerfile.lteRU.rhel8.2
@@ -54,7 +54,7 @@ RUN yum update -y && \
 
 WORKDIR /opt/oai-lte-ru/bin
 COPY --from=ru-build \
-    /oai-ran/targets/bin/oairu.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/oairu \
     /oai-ran/docker/scripts/entrypoint.sh \
     .
 
@@ -102,4 +102,4 @@ COPY --from=ru-build /oai-ran/docker/etc/rru* ./
 WORKDIR /opt/oai-lte-ru
 
 ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
-CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
+CMD ["/opt/oai-lte-ru/bin/oairu", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
diff --git a/docker/Dockerfile.lteRU.ubuntu18 b/docker/Dockerfile.lteRU.ubuntu18
index 157a5a615a9..88fbc59bbb7 100644
--- a/docker/Dockerfile.lteRU.ubuntu18
+++ b/docker/Dockerfile.lteRU.ubuntu18
@@ -59,7 +59,7 @@ RUN apt-get update && \
 
 WORKDIR /opt/oai-lte-ru/bin
 COPY --from=ru-build \
-    /oai-ran/targets/bin/oairu.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/oairu \
     /oai-ran/docker/scripts/entrypoint.sh \
     ./
 
@@ -95,4 +95,4 @@ COPY --from=ru-build /oai-ran/docker/etc/rru* ./
 WORKDIR /opt/oai-lte-ru
 
 ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
-CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
+CMD ["/opt/oai-lte-ru/bin/oairu", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
diff --git a/docker/Dockerfile.lteUE.rhel8.2 b/docker/Dockerfile.lteUE.rhel8.2
index 303394ea27a..f37a04fff15 100644
--- a/docker/Dockerfile.lteUE.rhel8.2
+++ b/docker/Dockerfile.lteUE.rhel8.2
@@ -58,11 +58,11 @@ RUN yum update -y && \
 
 WORKDIR /opt/oai-lte-ue/bin
 COPY --from=lte-ue-build \
-    /oai-ran/targets/bin/lte-uesoftmodem.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
     /oai-ran/docker/scripts/entrypoint.sh \
-    /oai-ran/targets/bin/conf2uedata \
-    /oai-ran/targets/bin/nvram \
-    /oai-ran/targets/bin/usim \
+    /oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
+    /oai-ran/cmake_targets/nas_sim_tools/build/nvram \
+    /oai-ran/cmake_targets/nas_sim_tools/build/usim \
     ./
 
 COPY --from=lte-ue-build \
@@ -114,5 +114,5 @@ WORKDIR /opt/oai-lte-ue/etc
 COPY --from=lte-ue-build /oai-ran/docker/etc .
 
 WORKDIR /opt/oai-lte-ue
-CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem.Rel15"]
+CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
 ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
diff --git a/docker/Dockerfile.lteUE.ubuntu18 b/docker/Dockerfile.lteUE.ubuntu18
index b2a0fd6e93d..e387718ab5b 100644
--- a/docker/Dockerfile.lteUE.ubuntu18
+++ b/docker/Dockerfile.lteUE.ubuntu18
@@ -64,11 +64,11 @@ RUN apt-get update && \
 
 WORKDIR /opt/oai-lte-ue/bin
 COPY --from=lte-ue-build \
-    /oai-ran/targets/bin/lte-uesoftmodem.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
     /oai-ran/docker/scripts/entrypoint.sh \
-    /oai-ran/targets/bin/conf2uedata \
-    /oai-ran/targets/bin/nvram \
-    /oai-ran/targets/bin/usim \
+    /oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
+    /oai-ran/cmake_targets/nas_sim_tools/build/nvram \
+    /oai-ran/cmake_targets/nas_sim_tools/build/usim \
     ./
 
 COPY --from=lte-ue-build \
@@ -108,5 +108,5 @@ WORKDIR /opt/oai-lte-ue/etc
 COPY --from=lte-ue-build /oai-ran/docker/etc .
 
 WORKDIR /opt/oai-lte-ue
-CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem.Rel15"]
+CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
 ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
diff --git a/docker/Dockerfile.nrUE.rhel8.2 b/docker/Dockerfile.nrUE.rhel8.2
index 3ee93ed5d27..95f1bf1eef9 100644
--- a/docker/Dockerfile.nrUE.rhel8.2
+++ b/docker/Dockerfile.nrUE.rhel8.2
@@ -59,7 +59,7 @@ RUN yum update -y && \
 
 WORKDIR /opt/oai-nr-ue/bin
 COPY --from=nr-ue-build \
-    /oai-ran/targets/bin/nr-uesoftmodem.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \
     /oai-ran/docker/scripts/entrypoint.sh \
     ./
 
@@ -123,5 +123,5 @@ WORKDIR /opt/oai-nr-ue/etc
 COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
 
 WORKDIR /opt/oai-nr-ue
-CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
+CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
 ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
diff --git a/docker/Dockerfile.nrUE.ubuntu18 b/docker/Dockerfile.nrUE.ubuntu18
index 0997783b8ba..c7afd2cd242 100644
--- a/docker/Dockerfile.nrUE.ubuntu18
+++ b/docker/Dockerfile.nrUE.ubuntu18
@@ -64,7 +64,7 @@ RUN apt-get update && \
 
 WORKDIR /opt/oai-nr-ue/bin
 COPY --from=nr-ue-build \
-    /oai-ran/targets/bin/nr-uesoftmodem.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \
     /oai-ran/docker/scripts/entrypoint.sh \
     ./
 
@@ -111,5 +111,5 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
     ldconfig
 
 WORKDIR /opt/oai-nr-ue
-CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
+CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
 ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
diff --git a/docker/Dockerfile.phySim.rhel8.2 b/docker/Dockerfile.phySim.rhel8.2
index c1d0e0b7ef8..944689c21e3 100644
--- a/docker/Dockerfile.phySim.rhel8.2
+++ b/docker/Dockerfile.phySim.rhel8.2
@@ -60,24 +60,24 @@ RUN yum update -y && \
     echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
     echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
 
-WORKDIR /opt/oai-physim/targets/bin
+WORKDIR /opt/oai-physim/bin
 COPY --from=phy-sim-build \
-    /oai-ran/targets/bin/dlsim.Rel15 \
-    /oai-ran/targets/bin/nr_dlsim.Rel15 \
-    /oai-ran/targets/bin/nr_prachsim.Rel15 \
-    /oai-ran/targets/bin/nr_ulschsim.Rel15 \
-    /oai-ran/targets/bin/polartest.Rel15 \
-    /oai-ran/targets/bin/ulsim.Rel15 \
-    /oai-ran/targets/bin/ldpctest.Rel15 \
-    /oai-ran/targets/bin/nr_dlschsim.Rel15 \
-    /oai-ran/targets/bin/nr_pbchsim.Rel15 \
-    /oai-ran/targets/bin/nr_pucchsim.Rel15 \
-    /oai-ran/targets/bin/nr_ulsim.Rel15 \
-    /oai-ran/targets/bin/smallblocktest.Rel15 \
+    /oai-ran/cmake_targets/ran_build/build/dlsim \
+    /oai-ran/cmake_targets/ran_build/build/nr_dlsim \
+    /oai-ran/cmake_targets/ran_build/build/nr_prachsim \
+    /oai-ran/cmake_targets/ran_build/build/nr_ulschsim \
+    /oai-ran/cmake_targets/ran_build/build/polartest \
+    /oai-ran/cmake_targets/ran_build/build/ulsim \
+    /oai-ran/cmake_targets/ran_build/build/ldpctest \
+    /oai-ran/cmake_targets/ran_build/build/nr_dlschsim \
+    /oai-ran/cmake_targets/ran_build/build/nr_pbchsim \
+    /oai-ran/cmake_targets/ran_build/build/nr_pucchsim \
+    /oai-ran/cmake_targets/ran_build/build/nr_ulsim \
+    /oai-ran/cmake_targets/ran_build/build/smallblocktest \
     ./
 
 COPY --from=phy-sim-build \
-    /oai-ran/targets/bin/libcoding.so \
+    /oai-ran/cmake_targets/ran_build/build/libcoding.so \
     /lib64/liblapacke.so.3 \
     /lib64/libX11.so.6 \
     /lib64/libXpm.so.4 \
diff --git a/docker/README.md b/docker/README.md
index 7844b46bce5..c4d799c6cee 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -46,8 +46,8 @@ For all platforms, the strategy for building docker/podman images is the same:
    -  lte-UE
    -  nr-UE
 *  These target images will only contain:
-   -  the generated executable (for example `lte-softmodem.Rel15`)
-   -  the generated shared libraries (for example `liboai_usrpdevif.so.Rel15`)
+   -  the generated executable (for example `lte-softmodem`)
+   -  the generated shared libraries (for example `liboai_usrpdevif.so`)
    -  the needed libraries and packages to run these generated binaries
    -  Some configuration file templates
    -  Some tools (such as `ping`, `ifconfig`)
diff --git a/sdr/ADRV9371_ZC706/SYRTEM_IQ_QuickStart.readme b/sdr/ADRV9371_ZC706/SYRTEM_IQ_QuickStart.readme
index 82814a1d588..5467c398e44 100755
--- a/sdr/ADRV9371_ZC706/SYRTEM_IQ_QuickStart.readme
+++ b/sdr/ADRV9371_ZC706/SYRTEM_IQ_QuickStart.readme
@@ -79,7 +79,7 @@ run:
 source oaienv
 sudo -E /usr/local/etc/syriq/cpu-irq.sh
 
-sudo -E cset shield -e ./targets/bin/nr-uesoftmodem.Rel15 -- --numerology 1 -r 106 -C 3510000000 --loop-memory --rf-config-file /usr/local/etc/syriq/ue.band22.tm1.PRB100.NR40.dat
+sudo -E cset shield -e ./cmake_targets/ran_build/nr-uesoftmodem -- --numerology 1 -r 106 -C 3510000000 --loop-memory --rf-config-file /usr/local/etc/syriq/ue.band22.tm1.PRB100.NR40.dat
 
 
 
@@ -133,4 +133,4 @@ run:
 source oaienv
 sudo -E /usr/local/etc/syriq/cpu-irq.sh
 
-sudo -E cset shield -e ./targets/bin/nr-softmodem.Rel15 -- -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band22.tm1.106PRB.adrv9371zc706.conf --rf-config-file /usr/local/etc/syriq/gnb.band22.tm1.PRB100.NR40_hwgain15.dat
+sudo -E cset shield -e ./cmake_targets/ran_build/build/nr-softmodem -- -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band22.tm1.106PRB.adrv9371zc706.conf --rf-config-file /usr/local/etc/syriq/gnb.band22.tm1.PRB100.NR40_hwgain15.dat
diff --git a/sdr/rfsimulator/README.md b/sdr/rfsimulator/README.md
index feb7f015b96..11e244e2623 100644
--- a/sdr/rfsimulator/README.md
+++ b/sdr/rfsimulator/README.md
@@ -101,7 +101,7 @@ Except this, the UE and the eNB can be used as if the RF is real. noS1 mode can
 
 If you reach 'RA not active' on UE, be careful to generate a valid SIM.
 ```bash
-$OPENAIR_DIR/targets/bin/conf2uedata -c $OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o .
+$OPENAIR_DIR/cmake_targets/ran_build/build/conf2uedata -c $OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o .
 ```
 
 ## 5G case
-- 
GitLab