compilef.inc : compile extrinsic function Fortran library

File : compilef.inc  used by :  trilib03.gms [html]

$call gmsunzip -o %1source.zip

$ifThen %system.buildcode% == AIX
$  call rm -f lib%1Fexample64.so
$  log >>> Building Fortran library for platform AIX
$  call xlf90_r -c -O -q64 %1fcf90.f90
$  if errorlevel 1 $abort problems compiling and linking
$  call ar -X64 ruv lib%1fcf90.a %1fcf90.o
$  if errorlevel 1 $abort problems compiling and linking
$  call xlc_r -G -brtl -bnoentry -q64 -b64 -DFNAME_LCASE_NODECOR -o lib%1Fexample64.so %1fclib.c %1cclibql.c lib%1fcf90.a -lm
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib ./lib%1Fexample64.so
$endIf

$ifThen %system.buildcode% == DEG
$  call rm -f lib%1Fexample64.dylib
$  log >>> Building Fortran library for platform DEG
$  call gfortran -c -m64 -O -fPIC  %1fcf90.f90
$  if errorlevel 1 $abort problems compiling and linking
$  call ar ruv lib%1fcf90.a %1fcf90.o
$  if errorlevel 1 $abort problems compiling and linking
$  call gcc -m64 -fPIC -dynamiclib -shared -DFNAME_LCASE_DECOR -o lib%1Fexample64.dylib %1fclib.c %1cclibql.c lib%1fcf90.a -lm
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib ./lib%1Fexample64.dylib
$endIf

$ifThen %system.buildcode% == LEG
$  call rm -f lib%1Fexample64.so
$  log >>> Building Fortran library for platform LEG
$  call gfortran -c -m64 -O -fPIC  %1fcf90.f90
$  if errorlevel 1 $abort problems compiling and linking
$  call ar ruv lib%1fcf90.a %1fcf90.o
$  if errorlevel 1 $abort problems compiling and linking
$  call gcc -m64 -fPIC -nostartfiles -shared -Wl,-Bsymbolic -DFNAME_LCASE_DECOR -o lib%1Fexample64.so %1fclib.c %1cclibql.c lib%1fcf90.a -lm
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib ./lib%1Fexample64.so
$endIf

$ifThen %system.buildcode% == SOX
$  call rm -f lib%1Fexample64.so
$  log >>> Building Fortran library for platform SOX
$  call f90 -c -m64 -xO5 -xmemalign=8s -KPIC %1fcf90.f90
$  if errorlevel 1 $abort problems compiling and linking
$  call ar ruv lib%1fcf90.a %1fcf90.o
$  if errorlevel 1 $abort problems compiling and linking
$  call cc -m64 -DFNAME_LCASE_DECOR -xmemalign=8s -KPIC -xO5 -G -Bsymbolic -o lib%1Fexample64.so  %1fclib.c %1cclibql.c lib%1fcf90.a -lm
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib ./lib%1Fexample64.so
$endIf

$ifThen %system.buildcode% == VS8
$  call rm -f %1Fexample.dll
$  log >>> Building Fortran library for platform VS8
$  call ifort -Fe%1Fexample.dll -fpp -LD -MT -nologo %1ifort.f90 %1ifortlibql.f90
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib %1Fexample.dll
$endIf

$ifThen %system.buildcode% == WEI
$  call rm -f %1Fexample64.dll
$  log >>> Building Fortran library for platform WEI
$  call ifort -Fe%1Fexample64.dll -fpp -LD -MT -nologo %1ifort.f90 %1ifortlibql.f90
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib %1Fexample64.dll
$endIf