diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index eb2db69c848a8807677bd6eff08dd4d522ddc814..f0f8830ed5f36da1866370eaa1c670fe8f7ceb84 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -333,7 +333,8 @@ function main() {
             echo_info "Will compile with verbose instructions"
             shift;;
        --build-doxygen)
-	        BUILD_DOXYGEN=1
+            CMAKE_CMD="$CMAKE_CMD -DGENERATE_DOXYGEN=ON"
+            BUILD_DOXYGEN=1
             echo_info "Will build doxygen support"
             shift;;     
        --build-coverity-scan)
@@ -535,6 +536,10 @@ function main() {
       execlist="$execlist nr-uesoftmodem"
   fi
 
+  if [[ "$execlist" == "" && "$SIMUS_PHY" != "1" && "$HW" == "None" ]]; then
+    SKIP_SHARED_LIB_FLAG="True"
+  fi
+
   echo_info "3. building the compilation directives ..."
 
   DIR=$OPENAIR_DIR/cmake_targets
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 860da152d01ce9c0f5ea23fbeee4e79464fe0d88..acf78e4793b6dd1a13472c3f6202d07488d9493f 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,15 +1,13 @@
+add_boolean_option(GENERATE_DOXYGEN False "Generate source code doc using doxygen")
 
-find_package(Doxygen QUIET)
+if(GENERATE_DOXYGEN)
+  find_package(Doxygen REQUIRED)
 
-if(DOXYGEN_FOUND)
   configure_file(Doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
   add_custom_target(doc
     ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
     COMMENT "Generating API documentation with Doxygen" VERBATIM
-    )
+  )
 else()
-  add_custom_target(doc
-    message(FATAL_ERROR "required to generate doxygen documentation but doxygen not installed")
-    )
-endif(DOXYGEN_FOUND)
-
+  message(STATUS "No Doxygen documentation requested")
+endif()
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 0c3683e8eed5f0273c2fa07b8bbac6d04a6138a9..0da3180b99957d665e0592bfc689267055541b8c 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -51,14 +51,14 @@ PROJECT_BRIEF          = "Full experimental OpenSource LTE and NR implementation
 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
 # the logo to the output directory.
 
-PROJECT_LOGO           = images/oai_logo.png
+PROJECT_LOGO           = @CMAKE_SOURCE_DIR@/doc/oai_logo.png
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
 # into which the generated documentation will be written. If a relative path is
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = GeneratedDoc
+#OUTPUT_DIRECTORY       = .
 
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and