]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # Copyright (C) 2004 Toon Knapen |
2 | # | |
3 | # Use, modification and distribution is subject to the Boost Software | |
1e59de90 TL |
4 | # License Version 1.0. (See accompanying file LICENSE.txt or |
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt) | |
7c673cae FG |
6 | |
7 | import toolset : flags ; | |
8 | import feature ; | |
9 | import fortran ; | |
10 | ||
11 | rule init ( version ? : command * : options * ) | |
12 | { | |
13 | } | |
14 | ||
15 | # Declare flags and action for compilation | |
16 | flags gfortran OPTIONS <fflags> ; | |
17 | ||
18 | flags gfortran OPTIONS <optimization>off : -O0 ; | |
19 | flags gfortran OPTIONS <optimization>speed : -O3 ; | |
20 | flags gfortran OPTIONS <optimization>space : -Os ; | |
21 | ||
22 | flags gfortran OPTIONS <debug-symbols>on : -g ; | |
23 | flags gfortran OPTIONS <profiling>on : -pg ; | |
24 | ||
25 | flags gfortran OPTIONS <link>shared/<main-target-type>LIB : -fPIC ; | |
26 | ||
27 | flags gfortran DEFINES <define> ; | |
28 | flags gfortran INCLUDES <include> ; | |
29 | ||
30 | rule compile.fortran | |
31 | { | |
32 | } | |
33 | ||
34 | actions compile.fortran | |
35 | { | |
1e59de90 | 36 | gcc -Wall $(OPTIONS) -D$(DEFINES) -I$(INCLUDES) -c -o "$(<)" "$(>)" |
7c673cae FG |
37 | } |
38 | ||
1e59de90 | 39 | generators.register-fortran-compiler gfortran.compile.fortran : FORTRAN FORTRAN90 : OBJ ; |