[petsc-users] Makefile options to leave .o files?
Jed Brown
jed at 59A2.org
Thu Sep 16 13:41:06 CDT 2010
On Thu, Sep 16, 2010 at 20:26, Keita Teranishi <keita at cray.com> wrote:
> I have observed that the default option of the makefile at the main
> directory deletes libpetsc.a file before compiling the source code files.
> Is there any options that keep libpetsc.a, and only compile those modified
> after libpetsc.a?
You can run make from subdirectories, but PETSc's normal recursive
make system does not do proper dependency analysis. If you are using
petsc-dev, there are two options.
config/builder.py leaves the .o files behind, but will require
rebuilding everything each time you switch PETSC_ARCH (this is an
implementation issue that could be fixed).
If you have CMake (>=2.6.2) installed, you can run make from the build
directory (as in make -j5 -C $PETSC_DIR/$PETSC_ARCH, the environment
variables are irrelevant for this option). This will only rebuild
what is necessary, and the .o files are separate for each PETSC_ARCH.
Jed
More information about the petsc-users
mailing list