compilef.inc : compile extrinsic function Fortran library

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

$call gmsunzip -o %1source.zip

$ifThen %system.buildcode% == DAC
$  call rm -f lib%1Fexample64.dylib
$  log >>> Building Fortran library for platform DAC
$  call gfortran -c -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 clang -fPIC -dynamiclib -shared -DFNAME_LCASE_DECOR -Wno-deprecated-declarations -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% == DEG
$  call rm -f lib%1Fexample64.dylib
$  log >>> Building Fortran library for platform DEG
$  call gfortran -c -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 -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 -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 -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% == 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