#
# Instructions for configuring Version5 components on MS-DOS system
#
cd %homepath%\Version5_evn\
.\script\instver5

#
# To activate hdf5 and Python3 bindings in the make utility, you need to define
# environment variables on a UNIX system. Add the information about the HDF5_INC,
# HDF5_API and FORTRANPATH environment variables in the .profile or .bashrc script.
# These lines are OS-dependent.

#
# On the recherche network at Polytechnique Montreal:
# Support for HDF5
export HDF5_INC="/usr/local/hdf5/include" # HDF5 include directory
if [ $MachineExtension = "-aix" ]
then
    export HDF5_INC="/usr/include" # HDF5 include directory
fi
export HDF5_API="$HDF5_INC/../lib" # HDF5 C API
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HDF5_API"
export FORTRANPATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/ # contains libgfortran.so

#
# On the RedHat 8 operating system:
# Support for HDF5
export HDF5_DIR="/usr/include" # HDF5 include directory
export HDF5_API="$HDF5_INC/../lib" # HDF5 C API
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HDF5_API"
# Support for Python3 API
export FORTRANPATH=/usr/lib/gcc/x86_64-redhat-linux/8/ # contains libgfortran.so

#
# On the Scibian 10 operating system:
# Support for HDF5
export HDF5_INC="/usr/include/hdf5/serial" # HDF5 include directory
export HDF5_API="/usr/lib/x86_64-linux-gnu/hdf5/serial" # HDF5 C API
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HDF5_API"
# Support for Python3 API
export FORTRANPATH=/usr/lib/gcc/x86_64-linux-gnu/8/ # contains libgfortran.so

#
# Instructions for configuring Version5 of Dragon/Donjon on UNIX systems
#
# To configure Version5 components with custom compiler using makefiles:
cd ~/Version5_evn/Donjon/
make
make clean
#
# To configure Version5 components with Intel compiler using makefiles:
cd ~/Version5_evn/Donjon/
make intel=1
make clean
#
# To build an HDF5-enabled version, simply write
make hdf5=1
#
# To build an OpenMP-enabled version, simply write
make openmp=1
#
# To execute the non-regression tests with custom compiler:
make tests
#
# To execute the non-regression tests with Intel compiler:
make tests intel=1
#
# To execute the non-regression tests, including those requiring hdf5 support:
make tests hdf5=1
#
# On AIX and Solaris OS, you must use GNU Make:
cd ~/Version5_evn/Donjon/
gmake
gmake clean
gmake tests

# To execute Trivac with custom compiler:
cd ~/Version5_evn/Trivac/
./rtrivac iaea3d.x2m

# In case of bug:
./rtrivac iaea3d.x2m -w

# To execute Dragon with custom compiler:
cd ~/Version5_evn/Dragon/
./rdragon iaea2d.x2m

# In case of bug:
./rdragon iaea2d.x2m -w

# To execute Dragon with Intel compiler:
cd ~/Version5_evn/Dragon/
./rdragon iaea2d.x2m intel

# To execute Donjon with custom compiler:
cd ~/Version5_evn/Donjon/
./rdonjon Candu6.x2m

# To configure the doc
cd ~/Version5_evn/doc/IGE335
./install

# To read the doc:
gv -antialias ~/Version5_evn/doc/IGE335/IGE335.pdf
