5 Debugging OOMMF

5.2 Understanding pimake

The OOMMF pimake application controls the compiling and linking of OOMMF’s C++ components. Based broadly on the Unix make utility, pimake is a platform independent tool written in Tcl. Each of the source code directories in the OOMMF distribution tree has a makerules.tcl file that specifies build targets and dependencies. A dependency tree is build from this information augmented with recursive tracking of #include statements inside the referenced source code files. Each time pimake is run it compares file timestamps against the dependency tree, and compiles and links any object and executable files that are older than any of their dependencies.

After editing *.h or *.cc files in OOMMF, you should run pimake to propagate your changes to the associated OOMMF executable(s). If you run tclsh oommf.tcl pimake in a directory below the OOMMF root directory, then only changes at that directory and lower are affected. You can use the -cwd option to pimake to change the effective starting directory. Changes to the OOMMF configuration files do not trigger dependency updates, so if you make changes affecting the build process in these files you should manually run

$ tclsh oommf.tcl pimake distclean
$ tclsh oommf.tcl pimake
from the OOMMF root directory to delete and then rebuild the full OOMMF project.