Hi Chen
If I understand correctly, what you want is to rebuild the PFLOTRAN library used by ATS after you made some changes to PFLOTRAN, so that you can use ATS with the new updated functions in PFLOTRAN.
If so, note the following points:
1. The PFLOTRAN library that ATS uses is not the same as PFLOTRAN (i.e. it is a different makefile target in the pflotran build; it is not 'make pflotran')
2. To build the PFLOTRAN library that ATS uses, you will need to set the same variables you set to build ATS and the TPLS because PFLOTRAN has dependencies. In this case, PETSC and HDF5 (that is the error you are getting in fact, that PFLOTRAN needs HDF5)
3. Once you successfully rebuild the PFLOTRAN library, you will have to rebuild the libraries that in turn depend on it. In this case, Alquimia.
4. Once you have rebuilt the libraries (TPLS), you can rebuild ATS itself.
So the question for you is, how familiar with the Amanzi TPLS build system? It seems you made your way into the PFLOTRAN TPL build, correct?
Thanks
Sergi