compilec.inc : compile extrinsic function C library

File : compilec.inc  used by :  trilib01.gms [html]   trilib04.gms [html]   parlib01.gms [html]

$call gmsunzip -o %1source.zip

$ifThen %system.buildcode% == AIX
$  call rm -f lib%1Cexample64.so
$  log >>> Building C library for platform AIX
$  call xlc_r -G -brtl -bnoentry -q64 -b64 -o lib%1Cexample64.so %1cclib.c %1cclibql.c %2 -lm
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib ./lib%1Cexample64.so
$endIf

$ifThen %system.buildcode% == DEG
$  call rm -f lib%1Cexample64.dylib
$  log >>> Building C library for platform DEG
$  call gcc -m64 -fPIC -dynamiclib -shared -o lib%1Cexample64.dylib %1cclib.c %1cclibql.c %2 -lm
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib ./lib%1Cexample64.dylib
$endIf

$ifThen %system.buildcode% == LEG
$  call rm -f lib%1Cexample64.so
$  log >>> Building C library for platform LEG
$  call gcc -m64 -fPIC -nostartfiles -shared -Wl,-Bsymbolic -o lib%1Cexample64.so %1cclib.c %1cclibql.c %2 -lm
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib ./lib%1Cexample64.so
$endIf

$ifThen %system.buildcode% == SOX
$  call rm -f lib%1Cexample64.so
$  log >>> Building C library for platform SOX
$  call cc -m64 -KPIC -G -Bsymbolic -o lib%1Cexample64.so %1cclib.c %1cclibql.c %2 -lm
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib ./lib%1Cexample64.so
$endIf

$ifThen %system.buildcode% == VS8
$  call rm -f %1Cexample.dll
$  log >>> Building C library for platform VS8
$  call cl.exe -nologo -O2 -Fe%1Cexample.dll -LD %1cclib.c %1cclibql.c %2 -link -def:%1cclib.def
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib %1Cexample.dll
$endIf

$ifThen %system.buildcode% == WEI
$  call rm -f %1Cexample64.dll
$  log >>> Building C library for platform WEI
$  call cl.exe -nologo -O2 -Fe%1Cexample64.dll -LD %1cclib.c %1cclibql.c %2 -link -def:%1cclib.def
$  if errorlevel 1 $abort problems compiling and linking
$  funclibin myLib %1Cexample64.dll
$endIf