/* Unix f90 and f77 (g77) compiler variables */ /* flag variables defined here */ FC_FLAGS = ; /* default compiler flags */ FC_OFLAGS = ; /* default compiler optimization flags */ FC_DFLAGS = ; /* default compiler debug flags */ FC_INCL_IFLAGS = ; /* system include paths here (if required) */ FC_IFLAGS = ; /* system include paths here (if required) */ LD_FLAGS = ; /* default linker flags */ LD_IFLAGS = ; /* default linker include paths */ LD_DFLAGS = ; /* default linker debug flags */ LD_OFLAGS = ; /* default linker optimization flags */ AR_FLAGS = ; /* default suffixes (and prefixes) for file names */ #ifndef FC /* can be set to f77 or g77 via env variable */ FC = f90; /* Fortran 90 compiler */ #endif LD = [FC]; /* use compiler for linking */ AR = ar; /* library archiver */ FC_INCL = c_incl; /* program to determine include dependencies */ /* set default extensions and prefixes */ #ifndef F /* allow for extension to be overidden (can be .f) */ F = .for; /* FORTRAN src files */ F1 = .f95; /* FORTRAN src files */ #endif O = .o; /* "object" files */ D = .d; /* include "dependency" files */ E = ; /* executable files */ A = .a; /* library "archive" files */ LIB_PREFIX = lib; /* default library prefix */ /* Note that -I syntax is same between c_incl program and f90 (f77/g77) compilers */ FC_INCL_IFLAGS += "-I"[INC]; /* project include paths here (if required) */ FC_IFLAGS += [FC_INCL_IFLAGS]; /* project include paths here (if required) */ /* these default options are specified for fast execution */ /* and robust compile time error detection */ #if [ matches f95 [FC] ] /* gfortran specific f95 options */ FC_FLAGS += -u; /* report undeclared variables */ FC_FLAGS += -U; /* recognize upper and lower case in source files */ FC_FLAGS += -C; /* check array references for out of range subscripts */ FC_FLAGS += -silent; /* supress compiler messages */ #endif LD_FLAGS += -Bstatic; /* default to static linking of libraries */ /* !FC_FLAGS += -w4; */ /* suppress warnings ( 0-most, 4-most) */ /* FC_FLAGS += -fnonstop; */ /* do not stop on exception traps */ /* may be Sun f77 specific - haven't tested with f90 or g77 yet */ /* enable this for faster execution speed - other options available also */ FC_OFLAGS += -fast; /* specify the default optimization (means -O4) */ /* may be Sun f77 specific - haven't tested with f90 or g77 yet */ /* enable some or all of these to assist in debugging - others also available */ FC_DFLAGS += -g; /* compile for debugging (some optimization is disabled) */ /* FC_DFLAGS += "-ftrap=common"; /* set common traps for help in debugging */ */ FC_DFLAGS += "-ftrap=%all"; /* set all traps for help in debugging */ FC_DFLAGS += "-XlistE"; /* errors only reported */ AR_FLAGS += -c; /* create new library */ AR_FLAGS += -q; /* operate quietly */ LD_IFLAGS += [FC_IFLAGS]; /* not sure if required - is in old recipes */ if [DEBUG] then /* include debug flags if DEBUG is set */ { FC_FLAGS += [FC_DFLAGS]; LD_FLAGS += [LD_DFLAGS]; } else if [OPT] then /* include optimization flags if OPT is set */ { FC_FLAGS += [FC_OFLAGS]; LD_FLAGS += [LD_OFLAGS]; }