diff --git a/README.md b/README.md
index 8f329f53b46b3e149ca1637b6985bf564316a9ec..c36acd9288e9d38605fe7eed858e659ba1c748ed 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,17 @@
 # Building TELEMAC-MASCARET on Windows
 
-This provides a set of scripts and a configuration file allowing to build TELEMAC-MASCARET on Windows using Mingw-w64.
+This repository provides a batch script and configuration files to build TELEMAC-MASCARET on Windows using Mingw-w64.
+
+The build includes the following dependencies:
+- MED (requires HDF5): add support for the MED file format.
+- MPI: enable runtime parallelism, using the latest implementation of Microsoft MPI. Also requires:
+    - METIS: used for partioning the mesh during a parallel run.
+- MUMPS: parallel direct solver which is only used by ARTEMIS. Also requires:
+    - MPI
+    - OpenBLAS (includes LAPACK)
+    - ScaLAPACK
+- AED2: activate more processes in WAQTEL.
+- GOTM: allow the use of the General Ocean Turbulence Model in TELEMAC-3D.
 
 ## Prerequisites:
 
@@ -11,57 +22,35 @@ Note: to install CMake without administrator rights, you need to download and ex
 manually.
 - **Mingw-w64**: download the latest version from [winlibs](https://github.com/brechtsanders/winlibs_mingw/releases/download/12.2.0-14.0.6-10.0.0-msvcrt-r2/winlibs-x86_64-posix-seh-gcc-12.2.0-mingw-w64msvcrt-10.0.0-r2.zip) and extract it to `C:\`.<br>
 Note: if you don't install Mingw-w64 in `C:\`, you will need to add its `bin` directory to your `PATH`.
-- **Python**: download and install the 3.10 version from [python.org](https://www.python.org/ftp/python/3.10.9/python-3.10.9-amd64.exe).<br>
+- **Python**: download and install the 3.10 64-bit version from [python.org](https://www.python.org/ftp/python/3.10.9/python-3.10.9-amd64.exe).<br>
 Note: to install Python without administrator rights, you must uncheck the option `Use admin privileges when installing py.exe`.
 
-## Proxy configuration
+## Optional: proxy configuration
 
-If your computer is behind a proxy, you also need to set Windows proxy environment variables, such as below:
+If your computer is behind a proxy, you must also set the proxy environment variables, as in the example below:
 ```
 C:\>set http_proxy=http://vip-users.proxy.edf.fr:3131
 C:\>set https_proxy=http://vip-users.proxy.edf.fr:3131
 ```
 
-## Building and installing TELEMAC-MASCARET dependencies
+## Building and installing TELEMAC-MASCARET
 
-TELEMAC-MASCARET can be built with or without several dependencies, which are listed below:
-- MED (requires HDF5): add support for the MED file format.
-- MPI: enable runtime parallelism, using the latest implementation of Microsoft MPI. Also requires:
-    - METIS: used for partioning the mesh during a parallel run.
-- MUMPS: parallel direct solver which is only used by ARTEMIS. Also requires:
-    - MPI
-    - OpenBLAS (includes LAPACK)
-    - ScaLAPACK
-- AED2: activate more processes in WAQTEL.
-- GOTM: allow the use of the General Ocean Turbulence Model in TELEMAC-3D.
+Once all software prerequisites have been installed and the proxy environment variables have been defined if necessary, TELEMAC-MASCARET can be built using the provided batch file. The only mandatory argument is the installation path, e.g.,
+to install TELEMAC-MASCARET in `C:\telemac`:
 
-These dependencies can be installed using the provided `build-telemac-deps.bat` script, as follows:
 ```
-C:\>build-telemac-deps C:\telemac-deps
+C:\wintel>build-telemac C:\telemac
 ```
 
-This will **download** and **build** all dependencies, and **install** them to the provided path, which is `C:\telemac-deps` in this example.
+This will **download** , **build** and **install** a full setup of the current development version of TELEMAC-MASCARET (i.e. the `main` branch) in the provided folder, which is `C:\telemac` in this example.
 
-## Building TELEMAC-MASCARET
+To build a specific version, you need to specify it using the `/v` switch, e.g:
 
-Once you have built the dependencies, you can build TELEMAC-MASCARET:
-- Clone the repository:
-```
-C:\>git clone https://gitlab.pam-retd.fr/otm/telemac-mascaret.git
-```
-- Copy the pysource batches from the `config` directory to TELEMAC-MASCARET `configs` directory:
-```
-C:\>xcopy /e/y wintel\config telemac-mascaret\configs\
-```
-- Edit both pysource batches to set the dependencies path, such as below:
 ```
-set TELEMACDEPS=C:\telemac-deps
-```
-- Setup TELEMAC-MASCARET environment by launching one of the pysource batch:
-```
-C:\>telemac-mascaret\configs\pysource.win.bat
-```
-- Build TELEMAC-MASCARET:
-```
-C:\>compile_telemac.py
+C:\wintel>build-telemac C:\telemac /v V8P4
 ```
+
+For now, the only supported stable version is V8P4.
+
+If the compilation went fine, the last message you will get should be `My work is done`.
+
diff --git a/build-telemac-deps.bat b/build-telemac.bat
similarity index 63%
rename from build-telemac-deps.bat
rename to build-telemac.bat
index 5325ad1de127a275cdeec6188f0e3150ea2e4ca4..df39bcb1746956d9eb30059aa9091e8368d370ba 100644
--- a/build-telemac-deps.bat
+++ b/build-telemac.bat
@@ -16,40 +16,85 @@ set mumps=mumps-5.2.1
 set aed2=libaed2-1.2.0
 set gotm=gotm-2019-06-14-opentelemac
 
-rem *********************************************************************************
-rem Parse input arguments to determine where and how the dependencies should be built
-rem *********************************************************************************
+rem ************************************************************************
+rem Parse input arguments to determine where and how TELEMAC should be built
+rem ************************************************************************
 
-rem Check that the installation path was provided
+rem Check that the installation path has been provided
 set install_path=%~1
 if "%install_path:~0,1%" == "/" set install_path=
 if "%install_path%" == "" (
   echo The syntax is:
   echo:
-  echo %~n0 installation_path [compiler]
+  echo %~n0 path [/comp[[:]compiler]] [/v[[:]version]]
   echo:
   echo Description:
-  echo 	installation_path:	Path where TELEMAC-MASCARET dependencies will be installed.
-  echo 	compiler (optional^):	Compiler that should be used, either mingw (default^) or intel.
+  echo          path: Path where TELEMAC will be installed.
+  echo:
+  echo          /c    Compiler to use, either mingw (default^) or intel.
+  echo          /v    Version to build, either V8P4 or main (default^)
   exit /b 0
 )
 
-rem Ensure that the installation path is absolute and create it
+rem Ensure that the installation path is absolute
 set install_path=%~f1
-mkdir %install_path% 2>nul
-rem Convert directory separators to forward slashes for CMake (they are mandatory because ScaLAPACK uses a bugged CMake module)
-set install_path=%install_path:\=/%
 
-rem Set the compiler (default is mingw)
-if "%~2" == "" (
+rem Set the external path using forward slashes for CMake (they are mandatory because ScaLAPACK uses a bugged CMake module)
+set external_path=%install_path:\=/%/external
+
+rem Parse optional arguments and fallback to default values if needed
+for /f "tokens=1,* delims= " %%a in ("%*") do set args=%%b
+call :arg_parser %args%
+if not defined arg_c set arg_c=mingw
+if not defined arg_v set arg_v=main
+
+rem ************************************
+rem Check that the compiler is available
+rem ************************************
+if /i %arg_c% == mingw (
   set compiler=mingw
-) else (
-  set compiler=%~2
+  goto find_mingw
+)
+
+if /i %arg_c% == intel (
+  set compiler=intel
+  goto find_intel
+)
+
+echo Unsupported compiler: %arg_c%
+exit /b 0
+
+:find_mingw
+rem Try to find Mingw in the current PATH
+set mingw_path=
+for /f "delims=" %%a in ('"where mingw32-make 2>nul"') do set mingw_path=%%a
+rem If not found, add the usual Mingw location to PATH
+if not defined mingw_path set path=C:\mingw64\bin;%path%
+for /f "delims=" %%a in ('"where mingw32-make 2>nul"') do set mingw_path=%%a
+if not defined mingw_path (
+  echo Error: Mingw not found. Please ensure that Mingw bin folder is in your PATH.
+  exit /b 0
 )
+goto compiler_set
+
+:find_intel
+rem TODO
 
+:compiler_set
 rem Store the compiler name with the first letter capitalized
 for /f "tokens=2 delims=:" %%a in ('"find "" ":%compiler:~,1%" 2>&1"') do set compiler_name=%%a%compiler:~1%
 
+rem ***********************************
+rem Check that the version is supported
+rem ***********************************
+set version=
+if /i %arg_v% == v8p4 set version=v8p4
+if /i %arg_v% == main set version=main
+if not defined version (
+  echo Unsupported TELEMAC version: %arg_v%
+  exit /b 0
+)
+
 rem ***********************************************************************
 rem Check that all prerequisites (Git, Cmake and Python 3.10) are available 
 rem ***********************************************************************
@@ -84,40 +129,21 @@ if %errorlevel% == 1 (
     exit /b 0
 )
 
+rem *************
+rem Clone Telemac 
+rem *************
+rd /s/q %install_path% 2>nul
+git clone -b %version% https://gitlab.pam-retd.fr/otm/telemac-mascaret.git %install_path% || exit /b 0
+
 rem **********************
 rem Build the dependencies
 rem **********************
-
 pushd %~dp0deps
 
-if %compiler% == mingw (
-  goto mingw_build
-)
-
 if %compiler% == intel (
   goto intel_build
 )
 
-echo Unsupported compiler: %compiler%
-
-:exit
-endlocal
-popd
-color 7
-exit /b 0
-
-:mingw_build
-rem Try to find Mingw in the current PATH
-set mingw_path=
-for /f "delims=" %%a in ('"where mingw32-make 2>nul"') do set mingw_path=%%a
-rem If not found, add the usual Mingw location to PATH
-if not defined mingw_path set path=C:\mingw64\bin;%path%
-for /f "delims=" %%a in ('"where mingw32-make 2>nul"') do set mingw_path=%%a
-if not defined mingw_path (
-  echo Error: Mingw not found. Please ensure that Mingw bin folder is in your PATH.
-  goto exit
-)
-
 call :build_hdf5 || goto exit
 call :build_med || goto exit
 call :build_metis || goto exit
@@ -128,7 +154,8 @@ call :build_mumps || goto exit
 call :build_aed2 || goto exit
 call :build_gotm || goto exit
 call :install_python_packages || goto exit
-goto exit
+popd
+goto build_telemac
 
 :intel_build
 call :build_hdf5 || goto exit
@@ -138,7 +165,47 @@ rem call :build_mumps || goto exit
 rem call :build_aed2 || goto exit
 rem call :buid_gotm || goto exit
 call :install_python_packages || goto exit
-goto exit
+popd
+
+rem *************
+rem Build TELEMAC
+rem *************
+:build_telemac
+pushd %install_path%
+
+xcopy /e/y %~dp0config configs\ >nul
+call configs\pysource.gnu.bat
+
+rem Replace "#!/usr/bin/env python3" with  "#!/usr/bin/env python" so that the scripts
+rem can be executed by the Python launcher using the active virtual environment
+rem This is done using "find" and "sed" from the GNU tools provided by Git for Windows
+for %%a in ("%git_path%\..\..") do set "path=%%~fa\usr\bin;%path%"
+set folders=scripts\python3 examples\python3 optionals\addons
+find %folders% -name "*.py" -exec sed -i 's/env\ python3/env\ python/g' {} ;
+
+rem Compile TELEMAC
+compile_telemac.py
+
+rem Copy DLLs required by the API and Hermes Python modules
+for %%i IN ("%mingw_path%") do set mingw_path=%%~dpi
+set external_path=%external_path:/=\%
+xcopy /y %mingw_path%\libgcc_s_seh-1.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %mingw_path%\libgfortran-5.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %mingw_path%\libquadmath-0.dll %install_path%\builds\gnu.static\wrap_api\lib\>nul
+xcopy /y %mingw_path%\libstdc++-6.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %mingw_path%\libwinpthread-1.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %external_path%\%hdf5%\bin\libhdf5.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %external_path%\%med%\bin\libmedC.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %external_path%\%med%\bin\libmedfwrap.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %external_path%\%msmpi%\bin\msmpi.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %external_path%\%gotm%\bin\libturbulence.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+xcopy /y %external_path%\%gotm%\bin\libutil.dll %install_path%\builds\gnu.static\wrap_api\lib\ >nul
+
+:exit
+endlocal
+popd
+color 7
+exit /b 0
 
 rem ****
 rem HDF5
@@ -154,7 +221,7 @@ rem MED
 rem ***
 :build_med
 call :download %med% "https://files.salome-platform.org/Salome/other/med-4.1.1.tar.gz" || exit /b 1
-set cmake_config_options=-DHDF5_ROOT_DIR:PATH=%install_path%/%hdf5% -DMEDFILE_BUILD_TESTS:BOOL=OFF -DMEDFILE_INSTALL_DOC:BOOL=OFF
+set cmake_config_options=-DHDF5_ROOT_DIR:PATH=%external_path%/%hdf5% -DMEDFILE_BUILD_TESTS:BOOL=OFF -DMEDFILE_INSTALL_DOC:BOOL=OFF
 if %compiler% == intel (
   rem MED libraries cannot be built as shared libraries with Visual Studio generator as they
   rem miss the proper __declspec(dllexport) declarations on each class and function
@@ -205,9 +272,9 @@ bin\mpifort -c -Jinclude ..\mpi.f90 || popd && exit /b 1
 del mpi.o
 cd ..\..
 rem Installation
-xcopy /e/y bin %install_path:/=\%\%msmpi%\bin\
-xcopy /e/y license %install_path:/=\%\%msmpi%\license\
-xcopy /e/y sdk\build-x86_64 %install_path:/=\%\%msmpi%\
+xcopy /e/y bin %external_path:/=\%\%msmpi%\bin\
+xcopy /e/y license %external_path:/=\%\%msmpi%\license\
+xcopy /e/y sdk\build-x86_64 %external_path:/=\%\%msmpi%\
 popd
 exit /b 0
 
@@ -226,7 +293,7 @@ rem *********
 :build_scalapack
 call :download %scalapack% "https://github.com/Reference-ScaLAPACK/scalapack/archive/refs/tags/v2.1.0.zip" || exit /b 1
 rem We need to use a foward slash for lapack and blas libraries paths since CMake CheckFortranFunctionExists is bugged when using a backward slash
-set cmake_config_options=-DMPI_BASE_DIR:PATH=%install_path%/%msmpi% -DLAPACK_LIBRARIES:STRING=%install_path%/%openblas%/lib/libopenblas.a -DBLAS_LIBRARIES:STRING=%install_path%/%openblas%/lib/libopenblas.a -DBUILD_TESTING:BOOL=OFF
+set cmake_config_options=-DMPI_BASE_DIR:PATH=%external_path%/%msmpi% -DLAPACK_LIBRARIES:STRING=%external_path%/%openblas%/lib/libopenblas.a -DBLAS_LIBRARIES:STRING=%external_path%/%openblas%/lib/libopenblas.a -DBUILD_TESTING:BOOL=OFF
 call :cmake_build %scalapack% || exit /b 1
 exit /b 0
 
@@ -235,9 +302,9 @@ rem MUMPS
 rem *****
 :build_mumps
 call :download %mumps% "https://github.com/scivision/mumps/archive/refs/tags/v5.4.1.11.zip" || exit /b 1
-set cmake_config_options=-DMUMPS_UPSTREAM_VERSION=5.2.1 -DBLAS_LIBRARY=%install_path%/%openblas%/lib/libopenblas.a -DLAPACK_LIBRARY=%install_path%/%openblas%/lib/libopenblas.a -DSCALAPACK_ROOT:PATH=%install_path%/%scalapack%
+set cmake_config_options=-DMUMPS_UPSTREAM_VERSION=5.2.1 -DBLAS_LIBRARY=%external_path%/%openblas%/lib/libopenblas.a -DLAPACK_LIBRARY=%external_path%/%openblas%/lib/libopenblas.a -DSCALAPACK_ROOT:PATH=%external_path%/%scalapack%
 if %compiler% == mingw (
-  set cmake_config_options=%cmake_config_options% -DMPI_ROOT:PATH=%install_path%/%msmpi%
+  set cmake_config_options=%cmake_config_options% -DMPI_ROOT:PATH=%external_path%/%msmpi%
 ) else (
   if not defined MKLROOT (
     rem Set Intel MKL environment
@@ -258,7 +325,7 @@ rem ****
 :build_aed2
 call :download %aed2% "http://www.opentelemac.org/index.php/component/jdownloads/finish/39-manual-installation-sources/2126-aed2m/0?Itemid=55" || exit /b 1
 echo Building libaed2 with %compiler_name% compiler...
-set install_dir=%install_path:/=\%\%aed2%
+set install_dir=%external_path:/=\%\%aed2%
 rd /s/q %install_dir% 2>nul
 pushd %aed2%
 mingw32-make || goto build_aed2_error
@@ -289,7 +356,7 @@ rem ***************
 rem Install all Python requirements for TELEMAC-MASCARET
 echo Installing Python requirements...
 rem Create a virtual environment
-set python_dir=%install_path:/=\%\python
+set python_dir=%external_path:/=\%\python
 rd /s/q %python_dir% 2>nul
 py -3.10 -m venv %python_dir% --prompt telemac
 rem Copy python310.dll to the virtual environment (required by F2PY)
@@ -309,7 +376,7 @@ pushd %~dp0
 pip install -r python_requirements.txt || goto install_error
 
 rem Starting with Python 3.8, mpi4py requires MPI DLLs to be present in the module directory: copy them there
-xcopy /y %install_path:/=\%\%msmpi%\bin\msmpi*.dll %python_dir%\Lib\site-packages\mpi4py\ >nul
+xcopy /y %external_path:/=\%\%msmpi%\bin\msmpi*.dll %python_dir%\Lib\site-packages\mpi4py\ >nul
 
 popd
 exit /b 0
@@ -318,6 +385,45 @@ exit /b 0
 popd
 exit /b 1
 
+rem ***********************************************
+rem Parse commandline arguments into sane variables
+rem ***********************************************
+:arg_parser
+rem Loop until two consecutive empty args
+if "%~1%~2" equ "" exit /b 0
+
+set "arg1=%~1" 
+set "arg2=%~2"
+shift
+
+rem Allow either / or -
+set "tst1=%arg1:-=/%"
+if "%arg1%" neq "" (
+  set "tst1=%tst1:~0,1%"
+) else (
+  set "tst1="
+)
+
+set "tst2=%arg2:-=/%"
+if "%arg2%" neq "" (
+  set "tst2=%tst2:~0,1%"
+) else (
+  set "tst2="
+)
+
+rem Capture assignments
+if "%tst1%" equ "/"  if "%tst2%" neq "/" if "%tst2%" neq "" (
+  set "arg_%arg1:~1%=%arg2%"
+  goto arg_parser
+)
+
+rem Capture flags
+if "%tst1%" equ "/" (
+    set "arg_%arg1:~1%=1"
+    goto arg_parser
+)
+goto arg_parser
+
 rem **************************************
 rem Download a library if not already done
 rem **************************************
@@ -373,7 +479,7 @@ echo Building %lib% with %compiler_name% compiler...
 pushd %lib%
 mkdir build-%compiler% 2>nul
 cd build-%compiler%
-cmake %cmake_config_options% -DCMAKE_INSTALL_PREFIX:PATH=%install_path%/%lib% .. || goto cmake_build_error
+cmake %cmake_config_options% -DCMAKE_INSTALL_PREFIX:PATH=%external_path%/%lib% .. || goto cmake_build_error
 cmake --build . %cmake_build_options% || goto cmake_build_error
 cmake --install . || goto cmake_build_error
 popd
diff --git a/config/pysource.win.bat b/config/pysource.gnu.bat
similarity index 75%
rename from config/pysource.win.bat
rename to config/pysource.gnu.bat
index 64caa4b59a072c7fa0064cebc81bef2d97883566..537bb95fa06062d9eefc7fdf213f07d57d6e5eb8 100644
--- a/config/pysource.win.bat
+++ b/config/pysource.gnu.bat
@@ -6,17 +6,17 @@ rem Path to TELEMAC root dir
 for %%a in ("%~dp0.") do set HOMETEL=%%~dpa
 set HOMETEL=%HOMETEL:~0,-1%
 rem Path to dependencies
-set TELEMACDEPS=C:\telemac-deps
+set EXTERNAL=%HOMETEL%\external
 rem Path to this file
 set SOURCEFILE=%~dp0%~n0%~x0
 rem Configuration file
-set SYSTELCFG=%HOMETEL%\configs\systel.edf.cfg
+set SYSTELCFG=%~dp0systel.cfg
 rem Name of the configuration to use
-set USETELCFG=win
+set USETELCFG=gnu.static
 
 rem Activate TELEMAC Python environment and set it as the default
 rem one to launch Python scripts from the command line
-call %TELEMACDEPS%\python\Scripts\activate.bat
+call %EXTERNAL%\python\Scripts\activate.bat
 
 rem Add Mingw to PATH if it is found
 call :find_mingw
@@ -30,25 +30,25 @@ set PYTHONPATH=%HOMETEL%\builds\%USETELCFG%\wrap_api\lib;%PYTHONPATH%
 
 rem External libraries versions
 rem HDF5
-set HDF5HOME=%TELEMACDEPS%\hdf5-1.10.9
+set HDF5HOME=%EXTERNAL%\hdf5-1.10.9
 set PATH=%HDF5HOME%\bin;%PATH%
 rem MED
-set MEDHOME=%TELEMACDEPS%\med-4.1.1
+set MEDHOME=%EXTERNAL%\med-4.1.1
 set PATH=%MEDHOME%\bin;%PATH%
 rem METIS
-set METISHOME=%TELEMACDEPS%\metis-5.1.0
+set METISHOME=%EXTERNAL%\metis-5.1.0
 set PATH=%METISHOME%\bin;%PATH%
 rem MSPMPI
-set MPIHOME=%TELEMACDEPS%\msmpi-10.1.2
+set MPIHOME=%EXTERNAL%\msmpi-10.1.2
 set PATH=%MPIHOME%\bin;%PATH%
 rem OPENBLAS, SCALAPACK and MUMPS
-set OPENBLASHOME=%TELEMACDEPS%\openblas-0.3.21
-set SCALAPACKHOME=%TELEMACDEPS%\scalapack-2.1.0
-set MUMPSHOME=%TELEMACDEPS%\mumps-5.2.1
+set OPENBLASHOME=%EXTERNAL%\openblas-0.3.21
+set SCALAPACKHOME=%EXTERNAL%\scalapack-2.1.0
+set MUMPSHOME=%EXTERNAL%\mumps-5.2.1
 rem AED
-set AEDHOME=%TELEMACDEPS%\libaed2-1.2.0
+set AEDHOME=%EXTERNAL%\libaed2-1.2.0
 rem GOTM
-set GOTMHOME=%TELEMACDEPS%\gotm-2019-06-14-opentelemac
+set GOTMHOME=%EXTERNAL%\gotm-2019-06-14-opentelemac
 set PATH=%GOTMHOME%\bin;%PATH%
 
 exit /b 0
diff --git a/config/pysource.win.debug.bat b/config/pysource.gnu.debug.bat
similarity index 75%
rename from config/pysource.win.debug.bat
rename to config/pysource.gnu.debug.bat
index 183cd7c0220bcc77664546f1b7bfb6b87955517a..d6a3a5e5d091a797978b6779ba7bcf55687798e6 100644
--- a/config/pysource.win.debug.bat
+++ b/config/pysource.gnu.debug.bat
@@ -6,17 +6,17 @@ rem Path to TELEMAC root dir
 for %%a in ("%~dp0.") do set HOMETEL=%%~dpa
 set HOMETEL=%HOMETEL:~0,-1%
 rem Path to dependencies
-set TELEMACDEPS=C:\telemac-deps
+set EXTERNAL=%HOMETEL%\external
 rem Path to this file
 set SOURCEFILE=%~dp0%~n0%~x0
 rem Configuration file
-set SYSTELCFG=%HOMETEL%\configs\systel.edf.cfg
+set SYSTELCFG=%~dp0systel.cfg
 rem Name of the configuration to use
-set USETELCFG=win.debug
+set USETELCFG=gnu.static.debug
 
 rem Activate TELEMAC Python environment and set it as the default
 rem one to launch Python scripts from the command line
-call %TELEMACDEPS%\python\Scripts\activate.bat
+call %EXTERNAL%\python\Scripts\activate.bat
 
 rem Add Mingw to PATH if it is found
 call :find_mingw
@@ -30,25 +30,25 @@ set PYTHONPATH=%HOMETEL%\builds\%USETELCFG%\wrap_api\lib;%PYTHONPATH%
 
 rem External libraries versions
 rem HDF5
-set HDF5HOME=%TELEMACDEPS%\hdf5-1.10.9
+set HDF5HOME=%EXTERNAL%\hdf5-1.10.9
 set PATH=%HDF5HOME%\bin;%PATH%
 rem MED
-set MEDHOME=%TELEMACDEPS%\med-4.1.1
+set MEDHOME=%EXTERNAL%\med-4.1.1
 set PATH=%MEDHOME%\bin;%PATH%
 rem METIS
-set METISHOME=%TELEMACDEPS%\metis-5.1.0
+set METISHOME=%EXTERNAL%\metis-5.1.0
 set PATH=%METISHOME%\bin;%PATH%
 rem MSPMPI
-set MPIHOME=%TELEMACDEPS%\msmpi-10.1.2
+set MPIHOME=%EXTERNAL%\msmpi-10.1.2
 set PATH=%MPIHOME%\bin;%PATH%
 rem OPENBLAS, SCALAPACK and MUMPS
-set OPENBLASHOME=%TELEMACDEPS%\openblas-0.3.21
-set SCALAPACKHOME=%TELEMACDEPS%\scalapack-2.1.0
-set MUMPSHOME=%TELEMACDEPS%\mumps-5.2.1
+set OPENBLASHOME=%EXTERNAL%\openblas-0.3.21
+set SCALAPACKHOME=%EXTERNAL%\scalapack-2.1.0
+set MUMPSHOME=%EXTERNAL%\mumps-5.2.1
 rem AED
-set AEDHOME=%TELEMACDEPS%\libaed2-1.2.0
+set AEDHOME=%EXTERNAL%\libaed2-1.2.0
 rem GOTM
-set GOTMHOME=%TELEMACDEPS%\gotm-2019-06-14-opentelemac
+set GOTMHOME=%EXTERNAL%\gotm-2019-06-14-opentelemac
 set PATH=%GOTMHOME%\bin;%PATH%
 
 exit /b 0
diff --git a/config/systel.cfg b/config/systel.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..014335b21ef8466176f34762c9c445c5985f6308
--- /dev/null
+++ b/config/systel.cfg
@@ -0,0 +1,116 @@
+# _____                              _______________________________
+# ____/ TELEMAC Project Definitions /______________________________/
+#
+[Configurations]
+configs: gnu.static gnu.static.debug gnu.dynamic dnu.dynamic.debug
+#
+# _____                   __________________________________________
+# ____/ Windows generals /_________________________________________/
+#
+[general]
+modules:    system
+#
+sfx_zip:    .zip
+sfx_obj:    .o
+sfx_mod:    .mod
+sfx_exe:    .exe
+#
+val_root:   <root>\examples
+val_rank:   all
+#
+# METIS info
+#
+libs_metis: -L%METISHOME%/lib -lmetis
+#
+# MED info
+#
+incs_med: -I%MEDHOME%/include
+flags_med: -DHAVE_MED
+libs_med: -lm -L%MEDHOME%/lib -lmed -lmedfwrap -L%HDF5HOME%/lib -lhdf5 -ldl -lstdc++
+#
+# MPI info
+#
+flags_mpi: -DHAVE_MPI
+mpi_cmdexec: mpiexec -n <ncsize> <exename>
+#
+# MUMPS info
+#
+incs_mumps: -I%MUMPSHOME%/include
+flags_mumps: -DHAVE_MUMPS
+libs_mumps: -L%MUMPSHOME%/lib -ldmumps -lmumps_common -lpord
+            -L%SCALAPACKHOME%/lib -lscalapack
+            -L%OPENBLASHOME%/lib -lopenblas
+            -L%MPIHOME%/lib -lmsmpi
+#
+# AED info
+#
+incs_aed: -I%AEDHOME%/include
+flags_aed: -DHAVE_AED2
+libs_aed: -L%AEDHOME%/lib -laed2
+#
+# GOTM info
+#
+incs_gotm: -I%GOTMHOME%/include
+flags_gotm: -DHAVE_GOTM
+libs_gotm: -L%GOTMHOME%/lib -lturbulence -lutil
+#
+# Generic compilation info
+#
+cmd_obj: mpif90 -c [obj_flags] <mods> <incs> <f95name>
+cmd_obj_c: gcc -c [cflags] <srcName> -o <objName>
+cmd_exe: mpif90 [exe_flags] -o <exename> <objs> <libs>
+#
+incs_all: [incs_med] [incs_mumps] [incs_aed] [incs_gotm]
+libs_all: -lgfortran [libs_med] [libs_metis] [libs_mumps] [libs_aed] [libs_gotm]
+#
+mods_all: -I <config>
+#
+cflags:
+fflags_gfo: -cpp -fconvert=big-endian -frecord-marker=4 -DHAVE_I16
+fflags_debug_gfo: -g -Wall -fcheck=all -fbacktrace -fbounds-check -finit-integer=-1 -finit-real=nan -ffpe-trap=invalid,zero,overflow
+#
+options: api
+#
+# Python modules generation options
+#
+f2py_name: f2py
+f2py_opt: -O3
+pyd_compiler: mingw32
+pyd_fcompiler: gnu95
+#
+# _____                     ________________________________________
+# ____/ GNU configurations /_______________________________________/
+#
+[gnu.static]
+brief: Windows static build using Mingw and MS-MPI
+#
+sfx_lib: .a
+cmd_lib: ar cru <libname> <objs>
+obj_flags: -O2 [fflags_gfo] [flags_mpi] [flags_mumps] [flags_med] [flags_aed] [flags_gotm]
+exe_flags: -fPIC [fflags_gfo]
+#
+[gny.dynamic]
+brief: Windows dynamic build using Mingw and MS-MPI
+#
+sfx_lib: .dll
+cmd_lib: mpif90 -fPIC -shared [fflags_gfo] -Wl,--subsystem,windows,--out-implib,<libname>.a -o <libname> <objs> <libs>
+cflags: -fPIC
+obj_flags: -O2 -fPIC [fflags_gfo] [flags_mpi] [flags_mumps] [flags_med] [flags_aed] [flags_gotm]
+exe_flags: -fPIC [fflags_gfo]
+#
+[gnu.static.debug]
+brief: Windows static build using Mingw and MS-MPI, in debug mode.
+#
+sfx_lib: .a
+cmd_lib: ar cru <libname> <objs>
+obj_flags: -c -O0 [fflags_gfo] [fflags_debug_gfo] [flags_mpi] [flags_mumps] [flags_med] [flags_aed] [flags_gotm]
+exe_flags: -fPIC [fflags_gfo] [fflags_debug_gfo]
+#
+[gnu.dynamic.debug]
+brief: Windows dynamic build using Mingw and MS-MPI, in debug mode.
+#
+sfx_lib: .dll
+cmd_lib: mpif90 -fPIC -shared [fflags_gfo] [fflags_debug_gfo] -Wl,--subsystem,windows,--out-implib,<libname>.a -o <libname> <objs> <libs>
+cflags: -fPIC
+obj_flags: -c -O0 -fPIC [fflags_gfo] [fflags_debug_gfo] [flags_mpi] [flags_mumps] [flags_med] [flags_aed] [flags_gotm]
+exe_flags: -fPIC [fflags_gfo] [fflags_debug_gfo]