\subsection*{Prerequisite}


\begin{DoxyItemize}
\item Fortran Compiler (Support $>$= F2003 standard)
\item \href{http://www.unidata.ucar.edu/software/netcdf/}{\tt Unidata $\vert$ Net\+C\+DF C Library}
\item \href{http://www.unidata.ucar.edu/downloads/netcdf/index.jsp}{\tt Unidata $\vert$ Net\+C\+DF Fortran Library}
\item \href{http://www.stack.nl/~dimitri/doxygen/}{\tt Doxygen}
\end{DoxyItemize}

\subsection*{How to build}

\subsubsection*{Extract tar.\+gz}

Make an empty directory, and extract archive. A directory `gtool5-\/(($\vert$version$\vert$))\textquotesingle{} created at the current working directory. \begin{DoxyVerb}$ tar xvf gtool5_current.tar.gz
\end{DoxyVerb}
 \subsubsection*{Specify Fortran Compiler}

Specify Fortran compiler to environment variable (($\ast$ FC $\ast$)), e.\+g. \begin{DoxyVerb}% FC=gfortran
\end{DoxyVerb}


Specify Fortran compiler options for optimization and debug to environment variable (($\ast$ F\+C\+F\+L\+A\+GS $\ast$)), e.\+g., \begin{DoxyVerb}% FCFLAGS="-g -O2 -fopenmp"
\end{DoxyVerb}


\subsubsection*{Speficy Make}

You must use G\+NU make to build. When G\+NU Make is provided as ((\+:gmake\+:)), Specify environment variable (($\ast$ M\+A\+KE $\ast$)), e.\+g. \begin{DoxyVerb}% MAKE=gmake
\end{DoxyVerb}


\subsubsection*{Execute configure}

Move created directroy, and excute `((\{ ./configure \}))\textquotesingle{}. \begin{DoxyVerb}% ./configure
\end{DoxyVerb}


If you want to change directory to which the library and the module, etc. are installed, please set ((\{ --help \})) option as follow. Available options are showed. \begin{DoxyVerb}% ./configure --help
\end{DoxyVerb}


Descriptions about principal options are listed below.

\+:((\{--with-\/nf-\/config=\}))(($\vert$\+A\+R\+G$\vert$))
\begin{DoxyItemize}
\item Default\+: search ((\+:nf-\/config\+:)) from ((\+:P\+A\+TH\+:)).
\item If you want to use another ((\+:nf-\/config\+:)), set the location of ((\+:nf-\/config\+:)) to (($\vert$\+A\+R\+G$\vert$)) explicitly.
\end{DoxyItemize}

\+:((\{--with-\/netcdf=\}))(($\vert$\+A\+R\+G$\vert$))
\begin{DoxyItemize}
\item When you can\textquotesingle{}t execute ((\+:nf-\/config\+:)), set the location of Net\+C\+DF C Library to (($\vert$\+A\+R\+G$\vert$)) explicitly.
\end{DoxyItemize}

\+:((\{--with-\/netcdff=\}))(($\vert$\+A\+R\+G$\vert$))
\begin{DoxyItemize}
\item When you can\textquotesingle{}t execute ((\+:nf-\/config\+:)), set the location of Net\+C\+DF Fortran library to (($\vert$\+A\+R\+G$\vert$)) explicitly.
\end{DoxyItemize}

\+:((\{--with-\/netcdf-\/include=\}))(($\vert$\+A\+R\+G$\vert$))
\begin{DoxyItemize}
\item When you can\textquotesingle{}t execute ((\+:nf-\/config\+:)), set the location of module file ((\+:netcdf.\+mod\+:)) to (($\vert$\+A\+R\+G$\vert$)) explicitly.
\end{DoxyItemize}

\+:((\{--prefix=\}))(($\vert$\+A\+R\+G$\vert$))
\begin{DoxyItemize}
\item Default\+: ((\{ /usr/local/gtool5 \})). set prefix to (($\vert$\+A\+R\+G$\vert$)).
\end{DoxyItemize}

\+:((\{--host=\}))(($\vert$\+A\+R\+G$\vert$))
\begin{DoxyItemize}
\item When cross-\/compiling, set the type of system on which the package will run to (($\vert$\+A\+R\+G$\vert$)).
\end{DoxyItemize}

\+:((\{--enable-\/mpi\}))
\begin{DoxyItemize}
\item Default\+: disable
\item Enable M\+PI support. Set M\+PI Fortran Compiler to ((\+:FC\+:)) or ((\+:--with-\/mpifc\+:)).
\end{DoxyItemize}

\+:((\{--with-\/mpifc\}))
\begin{DoxyItemize}
\item Default\+: none
\item Set M\+PI Fortran Compiler.
\end{DoxyItemize}

\+:((\{--with-\/exec\}))
\begin{DoxyItemize}
\item Default\+: none
\item Set M\+PI execute program for test.
\end{DoxyItemize}

\+:((\{--with-\/ncdump\}))
\begin{DoxyItemize}
\item Default\+: search ((\+:ncdump\+:)) from ((\+:P\+A\+TH\+:)).
\item Set ((\+:ncdump\+:)) for test.
\end{DoxyItemize}

\subsubsection*{Compile source code}

After execute ((\+:configure\+:)), start build processes as \begin{DoxyVerb}% make
\end{DoxyVerb}


\subsection*{Execute test programs}

In current directry, execute following command. \begin{DoxyVerb}$ make test
\end{DoxyVerb}


\subsection*{Install}

In current directory, execute following command. If you install to system, you need to be administrator. (By default, you install to system). \begin{DoxyVerb}# make install
\end{DoxyVerb}


\subsection*{Set P\+A\+TH to gt5frt}

If the installation is correctly done as stated above, shell script (({\itshape gt5frt})) is made under the directory ((\{--prefix=\}))(($\vert$\+A\+R\+G$\vert$))/bin (By default, ((\{ /usr/local/gtool5/bin/ \})) ).

Please specify P\+A\+TH to this directory. It is an example as follows when (({\itshape gt5frt})) is installed in ((\{/usr/local/gtool5/bin/\})) .

(({\itshape gt5frt})) is a shell script in order to easily compile and link Fortran programs which utilizes the \hyperlink{namespacegtool5}{gtool5} library. Link to the \hyperlink{namespacegtool5}{gtool5} library and directory appointment to the modules are done automatically by using gt5frt in place of command of the Fortran compiler. \begin{DoxyVerb}$ gt5frt test.f90
/usr/bin/gfortran -I/usr/local/gtool5/include -I/usr/include -g -O2 test.f90 \
  -L/usr/local/stow/gtool5/lib -lgtool -L/usr/lib -lnetcdff -lnetcdf\end{DoxyVerb}
 