[gmx-users] template.c

Chih-Ying Lin chihying2008 at gmail.com
Sat Sep 12 19:38:31 CEST 2009

To use template.c
1. create a file to put template.c and Makefile.x86_64-unknown-linux-gnu
2. under C compiler
   => type the command => make -f Makefile.x86_64-unknown-linux-gnu
   => type the command => cc -O -o template template.c -lm
   => type the command => ./template < template.in

Am I right?

Thank you

Chih-Ying Lin wrote:
> Hi
> Following are
> 1.  template.c
> 2.  README
> 3.  Makefile.x86_64-unknown-linux-gnu
> In the template.c => it includes several GROMACS headers.
> #include "statutil.h"
> #include "typedefs.h"
> #include "smalloc.h"
> #include "vec.h"
> #include "copyrite.h"
> #include "statutil.h"
> #include "tpxio.h"
> If I put the GROMACS headers with template.c in the same directory, should
> still need the Makefile for my architecture, intended to compile
> and link to the GROMACS libraries correctly ???

The point of the Makefile is that you don't need to move headers around
- like it says in the README:

"A Makefile.arch is created for each architecture you install
with the correct paths and libraries. You will have to link
(or copy) the correct makefile to "Makefile" or use the -f
option to gmake in order to select a makefile."

So do "make -f Makefile.x86_64-unknown-linux-gnu" like it says :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20090912/ab2e2e03/attachment.html>

More information about the gromacs.org_gmx-users mailing list