Given the complexity of the \PSIthree\ package, the prospect of adding
new modules or libraries may seem daunting at first.  Let's assume you
want to begin writing a new module named \file{great\_code} for
\PSIthree.  The following series of steps will generate the proper
directories and \file{Makefile}s to get started.  For convenience, the
top-level directory of the programmer's \PSIthree\ source tree will be
referred to as \$PSI3 and the top-level directory of the compilation
area as \$prefix:
\begin{enumerate}
\item Generate the new directory in the source tree: \\
{\tt mkdir \$PSI3/src/bin/great\_code}

\item {\tt cd \$PSI3/src/bin/great\_code}

\item Copy an existing \file{Makefile.in} from another module: \\
{\tt cp ../cscf/Makefile.in .}

\item Edit the \file{Makefile.in} so that it lists only the source
files for \file{great\_code} and includes in \shellvar{PSILIBS} only
those libraries needed to link the executable.

\item Return to the top of the source tree: {\tt cd \$PSI3}

\item Add the name of \file{great\_code}'s \file{Makefile} to
\file{configure.ac} (near the bottom of the file) and run
\file{autoconf} to generate a new \file{configure} script.

\item Go to the top of the compilation tree: {\tt cd \$prefix}.

\item Re-run the configure script to generate the \file{Makefile} for
\file{great\_code}.  Make sure you use the same options to
\file{configure} that you used before or other \file{Makefile}'s may
not function properly.  The command you used before can be found in
\file{\$prefix/config.status}.  (See also the \PSIthree\ installation
manual for more details on the options to \file{configure}.)

\end{enumerate}

Now you are ready to work on the code.  Changes to source files
(including the \file{Makefile} should be made to the files in
\shellvar{\$PSI3}\file{/src/bin/great\_code} and all compilations
should be run in \file{\$prefix/src/bin/great\_code}.


