File: f77

package info (click to toggle)
cook 2.5-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 5,860 kB
  • ctags: 3,247
  • sloc: ansic: 41,260; sh: 10,022; yacc: 3,397; makefile: 3,244; awk: 136
file content (64 lines) | stat: -rw-r--r-- 1,840 bytes parent folder | download
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];
}