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