[petsc-users] makefile for compiling multiple sources
Jed Brown
jed at jedbrown.org
Wed Mar 23 13:37:25 CDT 2016
Satish Balay <balay at mcs.anl.gov> writes:
> Not sure how ccache helps with header dependencies.
It returns the cached version if all the dependencies (including
headers) are unchanged.
> One can add in the dependencies to the makefile
>
> femex1.o: femex1.cpp lists.h shapes.h
> shapes.o: shapes.cpp shapes.h
This is an insane maintenance burden that is doomed to be eternally
incorrect and out of date.
You can generate correct header dependencies using the -MMD option (or
variants for other compilers; defined as C_DEPFLAG in PETSc makefiles
and used by gmakefile). It's simple; why not do it right?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160323/412fbdd6/attachment.pgp>
More information about the petsc-users
mailing list