/* Lahey Fortran 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_DFLAGS = ; /* default linker debug flags */ AR_FLAGS = ; /* default suffixes (and prefixes) for file names */ FC = lf95; /* Watcom 77 compiler (cross-compile capable) */ LD = lf95; /* linker */ AR = lm; /* library archiver */ FC_INCL = c_incl; /* program to determine include dependencies */ /* set default extensions and prefixes */ F1 = .f95; /* FORTRAN src files */ F = .for; /* FORTRAN src files */ D = .dep; /* include "dependency" files */ UNIX_SYS = [shell uname -s]; setenv UNIX_SYS = [UNIX_SYS]; #if [in [UNIX_SYS] Linux ] if [not [defined E]] then A = .a; /* library "archive" files */ O = .o; /* "object" files */ E = ; /* executable files */ #endif #if [in [UNIX_SYS] CYGWIN_NT-4.0 ] if [not [defined E]] then A = .lib; /* library "archive" files */ O = .obj; /* "object" files */ E = .exe; #endif #if [in [UNIX_SYS] CYGWIN_NT-5.0 ] if [not [defined E]] then A = .lib; /* library "archive" files */ O = .obj; /* "object" files */ E = .exe; #endif #if [in [UNIX_SYS] CYGWIN_NT-5.1 ] if [not [defined E]] then A = .lib; /* library "archive" files */ O = .obj; /* "object" files */ E = .exe; #endif #if [in [UNIX_SYS] SunOS ] if [not [defined E]] then A = .a; /* library "archive" files */ O = .o; /* "object" files */ E = ; #endif LIB_PREFIX = ; /* default library prefix */ /* Note differences between c_incl and fl95 include multiple file arg syntax */ /* The Lahey compiler wants multiple include paths to be specified as */ /* one -I option argument, ie. -I ipath1";"ipath2 */ /* (quotes required to allow bash to handle semicolon on commandline) */ FC_INCL_IFLAGS += "-I"[INC]; /* project include paths here (if required) */ /* because of problem appending multiple paths to the -I arglist */ /* and having them "quoted", I am doing it explicitly in the recipe */ /* at this time. Thus, the FC_IFLAGS isn't used in the recipes.l95 file. */ FC_IFLAGS += [FC_INCL_IFLAGS]; /* project include paths here (if required) */ /* Is this desireable? Coders should probably be doing this explicitly. */ /* FC_FLAGS += -sav; /* SAVE all local variables */ */ /* default error checking stuff */ /* FC_FLAGS += -nco; */ /* do not display compiler option settings */ /* FC_FLAGS += -wo; */ /* issue warnings about obsolete F90 features */ #if [in [UNIX_SYS] Linux ] /* FC_FLAGS += --chk; subscript bounds checking (disable for speed) */ /* FC_FLAGS += --stchk; stack checking */ FC_FLAGS += --in; /* declare type of all symbols */ FC_FLAGS += --warn; /* issue warnings and informational messages */ FC_FLAGS += --trap ; /* runtime traps for divide-by-zero (d), invalid */ /* operand (i), overflow (o), and underflow (u) */ FC_FLAGS += --trace; /* generate traceback if error */ FC_FLAGS += --ap; /* reload registers always to guard numeric precision*/ FC_FLAGS += --staticlink;/* avoids loading libfj9i6.so.l at runtime*/ #endif #if [in [UNIX_SYS] CYGWIN_NT-4.0 ] FC_FLAGS += -nco; /* no display compiler option settings */ FC_FLAGS += -chk; /* subscript bounds checking (disable for speed) */ FC_FLAGS += -stchk; /* stack checking */ FC_FLAGS += -in; /* declare type of all symbols */ FC_FLAGS += -w; /* issue warnings and informational messages */ FC_FLAGS += -trap dio ; /* runtime traps for divide-by-zero (d), invalid */ /* operand (i), overflow (o), and underflow (u) */ FC_FLAGS += -trace; /* generate traceback if error */ FC_FLAGS += -ap; /* reload registers always to guard numeric precision*/ FC_FLAGS += -nconcc; /* DON'T let console respect Fortran carriage control options */ #endif #if [in [UNIX_SYS] CYGWIN_NT-5.0 ] FC_FLAGS += -nco; /* no display compiler option settings */ FC_FLAGS += -chk; /* subscript bounds checking (disable for speed) */ FC_FLAGS += -stchk; /* stack checking */ FC_FLAGS += -in; /* declare type of all symbols */ FC_FLAGS += -w; /* issue warnings and informational messages */ FC_FLAGS += -trap dio ; /* runtime traps for divide-by-zero (d), invalid */ /* operand (i), overflow (o), and underflow (u) */ FC_FLAGS += -trace; /* generate traceback if error */ FC_FLAGS += -ap; /* reload registers always to guard numeric precision*/ FC_FLAGS += -nconcc; /* DON'T let console respect Fortran carriage control options */ #endif #if [in [UNIX_SYS] CYGWIN_NT-5.1 ] FC_FLAGS += -nco; /* no display compiler option settings */ FC_FLAGS += -chk; /* subscript bounds checking (disable for speed) */ FC_FLAGS += -stchk; /* stack checking */ FC_FLAGS += -in; /* declare type of all symbols */ FC_FLAGS += -w; /* issue warnings and informational messages */ FC_FLAGS += -trap dio ; /* runtime traps for divide-by-zero (d), invalid */ /* operand (i), overflow (o), and underflow (u) */ FC_FLAGS += -trace; /* generate traceback if error */ FC_FLAGS += -ap; /* reload registers always to guard numeric precision*/ FC_FLAGS += -nconcc; /* DON'T let console respect Fortran carriage control options */ #endif #if [in [UNIX_SYS] SunOS ] FC_FLAGS += --chk; /* subscript bounds checking (disable for speed) */ FC_FLAGS += --stchk; /* stack checking */ FC_FLAGS += --in; /* declare type of all symbols */ FC_FLAGS += --w; /* issue warnings and informational messages */ FC_FLAGS += --trap ; /* runtime traps for divide-by-zero (d), invalid */ /* operand (i), overflow (o), and underflow (u) */ FC_FLAGS += --trace; /* generate traceback if error */ FC_FLAGS += --ap; /* reload registers always to guard numeric precision*/ #endif /* "optimization" flags (use if [OPT] is set) */ FC_OFLAGS += -o1; /* turns on optimization */ FC_OFLAGS += -ntrace; /* turns off tracing */ FC_OFLAGS += -nchk; /* turns off subscript bounds checking */ FC_OFLAGS += -nstchk; /* turns off stack checking */ /* default debugging stuff (use if [DEBUG] set) */ FC_DFLAGS += -nfix; /* default of non fixed format code (tstsoil_debug failed without it) */ FC_DFLAGS += -chk; /* subscript bounds checking (disable for speed) */ FC_DFLAGS += -g; /* Lahey debugging information */ FC_DFLAGS += -o0; /* disable optimizations (helpful for debugging) */ FC_DFLAGS += -trace; /* generate traceback if error */ FC_DFLAGS += -w; /* issue warnings and informational messages */ FC_DFLAGS += -stchk; /* stack checking */ #if [in [UNIX_SYS] Linux ] LD_FLAGS += --warn; /* enable warnings */ LD_FLAGS += --ap; /* reload registers always to guard numeric precision*/ LD_FLAGS += --staticlink;/* avoids loading libfj9i6.so.l at runtime*/ #endif #if [in [UNIX_SYS] CYGWIN_NT-4.0 ] LD_FLAGS += -nco; /* no banner display */ LD_FLAGS += -nobanner; /* operate quietly */ LD_FLAGS += -twocase; /* enables case-sensitive symbols */ LD_FLAGS += -nomap; /* No link map */ LD_FLAGS += -warn; /* enable warnings */ LD_FLAGS += -ap; /* reload registers always to guard numeric precision*/ #endif #if [in [UNIX_SYS] CYGWIN_NT-5.0 ] LD_FLAGS += -nco; /* no banner display */ LD_FLAGS += -nobanner; /* operate quietly */ LD_FLAGS += -twocase; /* enables case-sensitive symbols */ LD_FLAGS += -nomap; /* No link map */ LD_FLAGS += -warn; /* enable warnings */ LD_FLAGS += -ap; /* reload registers always to guard numeric precision*/ #endif #if [in [UNIX_SYS] CYGWIN_NT-5.1 ] LD_FLAGS += -nco; /* no banner display */ LD_FLAGS += -nobanner; /* operate quietly */ LD_FLAGS += -twocase; /* enables case-sensitive symbols */ LD_FLAGS += -nomap; /* No link map */ LD_FLAGS += -warn; /* enable warnings */ LD_FLAGS += -ap; /* reload registers always to guard numeric precision*/ LD_FLAGS += -o1; /* optimization*/ #endif #if [in [UNIX_SYS] SunOS ] LD_FLAGS += --warn; /* enable warnings */ LD_FLAGS += --ap; /* reload registers always to guard numeric precision*/ #endif /* default debugging stuff (use if [DEBUG] set) */ LD_DFLAGS += -g; LD_DFLAGS += -trace; LD_DFLAGS += -fullwarn; /* enable more warnings */ LD_DFLAGS += -o0; /* optimization*/ /* not used right now AR_FLAGS += -; /* perform case sensitive comparison */ AR_FLAGS += -n; /* always create a new library */ AR_FLAGS += -nobanner; /* operate quietly */ */ 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]; }