Templates for Source Code and Makefiles
Templates for Source Code and Makefiles
We are providing templates for writing code and makefiles for both your
convience and to try and establish a consistent style within the collaboration.
After you look at the template with Mosaic you can get a copy using the Save As
option on the file menu.
With your local copy you can fill in the name and institution, so it is always
ready for you. It is important that you fill these in, since you may not be
the person who submits it to CVS.
The currently available templates are:
- A general subroutine template for E781: It
contains the CVS keywords needed to record the CVS transaction information,
and sets a style for comments and variable declarations.
- An offline analysis subroutine template is
available. Analysis subroutines called from driver have a particular form.
This template demonstrates this.
- A makefile for libraries: This makefile
needs a list of object files and a library name, and it can then generate
either a regular library or a debug library.
Instructions for using it:
- Replace all instances of xxxx by the name of your library
- Make a list of all object files in your library, where you find
list_o += .
- Save this file with your changes renaming it appropraitely.
- Make sure all your fortran files end with .F
- setup off781 if you haven't already.
- Use the command "gmake -f GNUmakefile.xxxx" to make the optimized lib
- Use the command "gmake -f GNUmakefile.xxxx DEBUG_LIB=1" to make
the debug library.
Last update 26 May 1995
procario@fnal.gov