Zoltan Developer's Guide | Next | Previous

## Compilation and Makefiles

The Zoltan distribution includes a main (top-level) makefile with targets for the Zoltan library, the test driver programs, and some graphical tools. When the library is compiled for a specific target platform, A, Autotools and CMake obtain provide platform-specific configuration information.

Both the Autotools and CMake build systems must be maintained in Zoltan. Thus, new source code files and directories must be added for both systems. It is easiest to follow the examples of existing files in the build environments; good examples are hsfc.h, hsfc.c, dr_loadbal_const.h and dr_loadbal.c.

To add new source files or source directories:

- Autotools: Add new library files or directories to zoltan/src/Makefile.am; add new driver files to zoltan/src/driver/Makefile.am. In the main zoltan directory, run the bootstrap-local script to rebuild the automated Makefiles.
- CMake: Add new library files to zoltan/src/CMakeLists.txt; add new driver files to zoltan/src/driver/CMakeLists.txt.

Alternatively, new algorithms can be added as separate libraries with which Zoltan may link. The implementation of the ParMETIS interface in Zoltan can serve as an example.

To add new third-party libraries:

- Autotools: Add checks new library paths and include files to zoltan/configure.ac. Search for the string "parmetis" in zoltan/configure.ac, and follow its example for the new library. Also edit zoltan/src/include/Zoltan_config.h.in to include a macro for the new third-party library; follow the example of "HAVE_PARMETIS". In the main zoltan directory, run the bootstrap-local script to rebuild the automated configure and Makefiles.
- CMake: Follow the instructions in Trilinos/cmake/HOWTO.ADD_TPL In zoltan/src/CMakeLists.txt and zoltan/cmake/Zoltan_config.h.in, follow the example of "HAVE_PARMETIS".

[Table of Contents | Next: Zoltan Interface and Data Structures | Previous: Layout of Directories | Privacy and Security]