Next: Code Debugging
Up: Makefiles in PSI3
Previous: PSI Makefiles
  Contents
Preparing to Developing New PSI3 Code
Given the complexity of the PSI3 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 great_code for
PSI3. The following series of steps will generate the proper
directories and Makefiles to get started. For convenience, the
top-level directory of the programmer's PSI3 source tree will be
referred to as $PSI3 and the top-level directory of the compilation
area as $prefix:
- Generate the new directory in the source tree:
mkdir $PSI3/src/bin/great_code
- cd $PSI3/src/bin/great_code
- Copy an existing Makefile.in from another module:
cp ../cscf/Makefile.in .
- Edit the Makefile.in so that it lists only the source
files for great_code and includes in PSILIBS only
those libraries needed to link the executable.
- Return to the top of the source tree: cd $PSI3
- Add the name of great_code's Makefile to
configure.in (near the bottom of the file) and run
autoconf to generate a new configure script.
- Go to the top of the compilation tree: cd $prefix.
- Re-run the configure script to generate the Makefile for
great_code. Make sure you use the same options to
configure that you used before or other Makefile's may
not function properly. The command you used before can be found in
$prefix/config.status. (See also the PSI3 installation
manual for more details on the options to configure.)
Now you are ready to work on the code. Changes to source files
(including the Makefile should be made to the files in
$PSI3/src/bin/great_code and all compilations
should be run in $prefix/src/bin/great_code.
Next: Code Debugging
Up: Makefiles in PSI3
Previous: PSI Makefiles
  Contents
psi
2003-01-07