diff --git a/NPLib/CMakeLists.txt b/NPLib/CMakeLists.txt
index 1594e19a32d283cc4446a07c8fa60569ee9c19de..c29ebdfe328fd2b068d708d06ffc41720d185f2d 100644
--- a/NPLib/CMakeLists.txt
+++ b/NPLib/CMakeLists.txt
@@ -138,4 +138,5 @@ file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" "${CMAKE_
 set(CONF_INCLUDE_DIRS "./" "./")
 configure_file(ressources/CMake/NPLibConfig.cmake.in "${PROJECT_BINARY_DIR}/NPLibConfig.cmake" @ONLY)
 configure_file(scripts/nptool-cleaner.sh "${CMAKE_BINARY_OUTPUT_DIRECTORY}/nptool-cleaner" @ONLY)
+configure_file(scripts/nptool-compilation.sh "${CMAKE_BINARY_OUTPUT_DIRECTORY}/npcompilation" @ONLY)
 configure_file(scripts/nptool-wizard.sh "${CMAKE_BINARY_OUTPUT_DIRECTORY}/nptool-wizard" @ONLY)
diff --git a/NPLib/scripts/nptool-compilation.sh b/NPLib/scripts/nptool-compilation.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d0c1686f753a05b532fa8876650c20701f33a8f3
--- /dev/null
+++ b/NPLib/scripts/nptool-compilation.sh
@@ -0,0 +1,91 @@
+# *****************************************************************************
+# * Copyright (C) 2016   this file is part of the NPTool Project              *
+# *                                                                           *
+# * For the licensing terms see $NPTOOL/Licence/NPTool_Licence                *
+# * For the list of contributors see $NPTOOL/Licence/Contributors             *
+# *****************************************************************************/
+
+# *****************************************************************************
+# * Original Author: A. Matta  contact address: a.matta@surrey.ac.uk          *
+# *                                                                           *
+# * Creation Date  : 23/4/2014                                                *
+# * Last update    :                                                          *
+# *---------------------------------------------------------------------------*
+# * Decription: This script edit the user .rootlogon.C file to load NPTool    *
+# * Libraries.                                                                *
+# *                                                                           *
+# *---------------------------------------------------------------------------*
+# * Comment:                                                                  *
+# *                                                                           *
+# *                                                                           *
+# *****************************************************************************
+
+#! /bin/bash
+# save the current folder information
+FOLDER=${PWD}
+
+# simulation
+if [ "$1" = "s" ]; then
+  cd $NPTOOL/NPSimulation
+  if [ -f "build.ninja" ]; then
+    ninja install
+  elif [ -f "Makefile" ]; then
+    make install
+  else
+    cmake ./
+    make install
+  fi
+
+# lib
+elif [ "$1" = "l" ]; then
+  cd $NPTOOL/NPLib
+  if [ -f "build.ninja" ]; then
+    ninja install
+  elif [ -f "Makefile" ]; then
+    make install
+  else
+    cmake ./
+    make install
+  fi
+
+# all
+elif [ "$1" = "a" ]; then
+  cd $NPTOOL/NPSimulation
+  if [ -f "build.ninja"  ]; then
+    ninja install
+  elif [ -f "Makefile" ]; then
+    make install
+  else
+    cmake ./
+    make install
+  fi
+
+  cd $NPTOOL/NPLib
+  if [ -f "build.ninja"  ]; then
+    ninja install
+  elif [ -f "Makefile" ]; then
+    make install
+  else
+    cmake ./
+    make install
+  fi
+
+  # current folder 
+  cd $FOLDER
+  echo "Folder is $PWD"
+  if [ -f "build.ninja"  ]; then
+    ninja 
+  elif [ -f "Makefile" ]; then
+    make 
+  else
+    echo "no build in current folder"
+  fi
+
+else
+  echo "Unexpected argument: $1"
+  echo "Expecting : s (simulation) , l (library) or a (all)"
+fi
+
+# return to original folder
+cd $FOLDER
+