#include "../SRC/h.h"

int build_makefile_proto()
{
     
     int              i,cookie;
     int              line=0;
     FILE             *fp,*fpout;
     char             str[1024],str2[256];
     
     
     fp=fopen("../Makefile","r");
     if (fp==NULL)
     {
	  perror("opening ../Makefile");
	  return(-1);
     }
     
     close(creat("make.body",0644));
     fpout=fopen("make.body","w");
     if (fpout==NULL)
     {
	  perror("opening make.body");
	  exit(-1);
     }

   
     while (fgets(str,sizeof(str),fp))
     {
	  if (strstr(str,"-=-=-=-=-="))
	  {
	       fprintf(fpout,"%s",str);
	       while (fgets(str,sizeof(str),fp))
	       {
		    fprintf(fpout,"%s",str);
	       }
	       goto end;
	  }
	  
     }
   end:
     fclose(fp);
     fclose(fpout);
     
}

