1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
/*
* NAME
* f77 - the Fortran compiler cookbook
*
* DESCRIPTION
* This cookbook describes how to work with C files.
* Include file dependencies are automatically determined.
*
* RECIPES
* %.o: %.f77 make object files form C source files
*
* VARIABLES
* f77 The Fortran compiler command
* Not altered if already defined.
* f77_flags options to pass to the Fortran compiler command
* Not altered if already defined.
* The default is empty.
* ld_flags Options passed to the compiler when linking,
* these are typically library search paths and libraries.
* Not altered if already defined.
* The default is empty.
* f77_src Fortran source files in the current directory.
* dot_src Source files constructable in the current directory
* (unioned with existing setting, if necessary).
* dot_obj Object files constructable in the current directory
* (unioned with existing setting, if necessary).
* dot_clean Files which may be removed from the current directory
* in a clean target.
*
* SEE ALSO
* program The program cookbook:
* ld The linker program
* ld_flags The linker options, NOT libraries.
* ld_libraries The linker options (-L, -l) for libraries.
*
* MANIFEST: cookbook for using Fortran
*/
#pragma once
if [not [defined f77]] then
f77 = f77;
if [not [defined f77_flags]] then
f77_flags = ;
f77_src = [glob "*.f77" ];
if [not [defined dot_src]] then
dot_src = ;
dot_src = [stringset [dot_src] [f77_src] - [fromto %.f77 %.s [f77_src]]];
if [not [defined dot_obj]] then
dot_obj = ;
dot_obj = [stringset [dot_obj] [fromto %.f77 %.o [f77_src]]];
if [not [defined dot_clean]] then
dot_clean = ;
dot_clean =
[stringset
[dot_clean]
[fromto %.f77 %.o [f77_src]]
[fromto %.f77 %.s [f77_src]]
];
%.o: %.f77
{
[f77] [f77_flags] -c [resolve %.f77];
}
|