/* Unix (Solaris) f95 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 f90 or f95 via env variable */ FC = f95; /* Fortran 95 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 D = .d; /* include "dependency" files */ O = .o; /* "object" 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 f95 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] ] /* Sun specific f95 options */ FC_FLAGS += -u; /* report undeclared variables (implicit none) */ /* FC_FLAGS += -U; */ /* recognize upper and lower case in source files */ FC_FLAGS += -C; /* check array references for out of range subscripts */ /* FC_FLAGS += -e; */ /* Extend source line maximum length to 132 characters */ FC_FLAGS += -dalign; /* force 8 byte boundaries */ /* FC_FLAGS += -silent; */ /* supress compiler messages */ #endif LD_FLAGS += -Bstatic; /* default to static linking of libraries */ FC_FLAGS += -w2; /* show warning/errors/etc. (0-least, 4-most) */ #if [ matches sun%1 [os machine] ] /* Sun machine? */ FC_FLAGS += -free; /* assume all src files are F95 free format */ #endif /* FC_FLAGS += -fnonstop; */ /* do not stop on exception traps */ /* enable this for faster execution speed - other options available also */ #if [ matches sun%1 [os machine] ] /* Sun machine? */ FC_OFLAGS += -fast; /* specify the default optimization (means -O5, etc) */ LD_OFLAGS += -fast; /* must be used if specified while compiling (for Solaris Fortran)*/ #endif /* 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]; }