[gmx-developers] Re: include files
lindahl at stanford.edu
Sat Feb 8 00:01:06 CET 2003
> Also where should I put this .h file - src/tools/ or include/ ?
> I don't understand what the policy is on this. Maybe I was wrong to
> move pp2shift.h to include/ .
Well, if we only had a policy :-)
A long time ago, all source files were in the include directory. Our
current aim is however to reduce this number significantly, and limit
it to the few header files that are necessary to include if you want to
link with exported function from the gromacs libraries. The remaining
program-specific files should be in the same directory as the program.
> (BTW it looks like any .h files in src/tools should be explicitly
> put in [program]_SOURCES in Makefile.am, but those in include/
> should not - is that right?)
Yes - this has to do with the way automake calculates dependencies.
Your program depends on your C source files and header files in the
current directory, and the Gromacs libraries. If you execute make from
the top level directory make will find the library dependency in the
library header file and rebuilt it if necessary.
Automake is actually very powerful when you get to know it - the
important point is to realize that you should only describe direct
dependencies, everything else will be automatic.
More information about the gromacs.org_gmx-developers