next up previous contents
Next: Adding Source Files Up: Anatomy of a Thorn Previous: The configuration.ccl   Contents


Naming Conventions for Source Files

The make system uses file extensions to designate coding language, as well as other properties of the code in the file.

The following extensions are understood:

Extension Language Format Preprocess
.F Fortran 90 fixed yes
.f Fortran 90 fixed no
.F90 Fortran 90 free yes
.f90 Fortran 90 free no
.F77 Fortran 77 fixed yes
.f77 Fortran 77 fixed no
.c C - yes
.cc or .C C++ - yes

In order to use Cactus #include directives in a file, it must be preprocessed.

A complete description of Fortran fixed and free format can be found in any textbook on Fortran 90. The most obvious differences are that in fixed format, code must begin after the 5th column and line continuations are indicated by a character in column 5, while in free format, lines can begin anywhere, and line continuations are indicated by an ampersand at the end of the line to be continued. Also note that statement labels are handled very differently.

The following restrictions apply to file names:

  • For portability across all operating systems, the base names for any particular extension should not depend on the operating system being case sensitive (e.g. having MyFile.c and MYFILE.f77 is allright, but MyFile.c and MYFILE.c could cause problems).
  • Currently, all source files within a thorn must have distinct names, regardless of whether they are placed in different subdirectories. We hope to relax this in future. Different thorns may have files with the same names, however.


next up previous contents
Next: Adding Source Files Up: Anatomy of a Thorn Previous: The configuration.ccl   Contents