/* */
parse arg flist Include
compiler ="@icc.exe" Include "/DHAVE_CONFIG_H /Ss /O /Gm /Ge- /G5 /Oi /Q+ /W1 /C" 
/*  /Ge- = build DLL */
response="response.lnk"
linker="ilink /NOFREE @"||response

/* Compile */
DO FOREVER
file=linein(flist)
if file = "" then LEAVE
ext=RIGHT(file,2)
if ext = ".c" THEN
  DO
     say "file=" file 
     compiler file
  END  
/* say 'file=' file ext */
END
linein(flist,1,0)

/* make response file */
'del ' response '/N'
rc=lineout(response,"/base:0x10000  /exepack:2 /st:256000 /packd /noe /m /l +")
out=""
DO FOREVER
file=linein(flist)
if file = "" then LEAVE
ext=RIGHT(file,2)
if ext = ".c" THEN
  DO
/*     say "file=" file out */
     l=LENGTH(file)
     file0 = LEFT(file,l-2)
     fileObj = file0||".obj"
     if out = "" then nop
     else  rc= lineout(response, out "+");
     out = fileObj 
  END  
/* say 'file=' file ext */
END
if out = "" then nop
else rc= lineout(response, out );

rc= lineout(response, "gDdll.dll" );
rc= lineout(response, "gDdll.map" );
rc= lineout(response, "JpegLib.lib+" );
rc= lineout(response, "PngLib.lib+" );
rc= lineout(response, "Zlib.lib+" );
rc= lineout(response, "FtreeType.lib" );
rc= lineout(response, "gDdll.DEF" );
rc= lineout(response);

/* linker call with response file */
linker

/*delete OBJ */
linein(flist,1,0)
DO FOREVER
file=linein(flist)
if file = "" then LEAVE
ext=RIGHT(file,2)
if ext = ".c" THEN
  DO
     l=LENGTH(file)
     file0 = LEFT(file,l-2)
     fileObj = file0||".obj"
     delObj = "@del" fileObj "/N"
     delObj 
  END  
END
