precompilation(flag,cmd,incl_path,path,listf)
Add here a paragraph of the function description. Other paragraph can be added
Add here a paragraph of the function description
Add here scilab instructions and comments
//precompilation //Entrée flag : flag compilateur (GCC,LCC,VC) // cmd : commande du compilateur // incl_path : répertoires à inclure lors de la compilation // path : le chemin du répertoire de compilation // listf : liste des fichiers à compiler sans extension (ex:monmodule) function []=precompilation(flag,cmd,incl_path,path,listf) printf(" Make first compilation...\n"); select flag case 'GCC' then INCL_PATH=incl_path; CCFLAG=[]; for i=1:size(INCL_PATH,'*') CCFLAG=CCFLAG+"-I"+INCL_PATH(i)+" "; end CCFLAG=CCFLAG+"-c "; cmd=cmd+CCFLAG; listf=listf+'.c'; case 'G77' then FCFLAG=[]; FCFLAG=FCFLAG+"-c "; cmd=cmd+FCFLAG; listf=listf+'.f'; case 'LCC' then INCL_PATH=incl_path; CCFLAG=[]; for i=1:size(INCL_PATH,'*') CCFLAG=CCFLAG+"-I"+INCL_PATH(i)+" "; end CCFLAG=CCFLAG+"-c "; cmd=cmd+CCFLAG; listf=listf+'.c'; case 'VC' then INCL_PATH=incl_path; CCFLAG=[]; for i=1:size(INCL_PATH,'*') CCFLAG=CCFLAG+"/I "+INCL_PATH(i)+" "; end CCFLAG=CCFLAG+"/c "; cmd=cmd+CCFLAG; listf=listf+'.c'; case 'trash' then printf("Compilation aborted\n"); return; end //change directory rep=pwd(); chdir(MODNUM+path); //compilation for i=1:size(listf,'*') unix_g(cmd+listf(i)) end //change directory chdir(rep); endfunction