Branch: Tag:

1998-02-27

1998-02-27 16:45:40 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

stack option added

Rev: NT/tools/rntcc:1.11

56:    string *sources=({});    int debug,optimize;    string output; +  int share=0;       mixed *opts=Getopt.find_all_options(argv, ({    ({"oper_pre",Getopt.NO_ARG, ({"-E"}) }),
64:    ({"optimize",Getopt.MAY_HAVE_ARG, ({"-O"}) }),    ({"include",Getopt.HAS_ARG, ({"-I"}) }),    ({"link",Getopt.HAS_ARG, ({"-l"}) }), -  ({"ignore",Getopt.MAY_HAVE_ARG, ({"-t","-s"}) }), +  ({"share",Getopt.MAY_HAVE_ARG, ({"-s"}) }), +  ({"ignore",Getopt.MAY_HAVE_ARG, ({"-t"}) }),    ({"ignore",Getopt.HAS_ARG, ({"-R","-L"}) }),    ({"warn",Getopt.MAY_HAVE_ARG, ({"-W"}) }),    ({"define",Getopt.HAS_ARG, ({"-D"}) }),
75:    {    switch(option[0])    { +  case "share": +  share=1; +  ldopts+=({"SYS","nt_dll"}); +  cflags+=({"-bd"}); +  break; +     case "oper_pre": operation="preprocess"; break;    case "oper_comp": operation="compile"; break;    case "debug":
151:    string errorfile="TMP"+getpid()+".err";    rm(errorfile);    -  cflags+=({"-bm","-zq","-hw"}); +  cflags+=({"-bm","-zq","-hw","-sg"});       switch(operation)    {
184:    string ldfile="TMP"+getpid()+".lk";    if(!output) output="a.out";    rm(ldfile); +  +  target=output; +  if(!share) target+=".exe"; +     Stdio.write_file(ldfile, -  "NAME "+output+".exe " -  +ldopts*" "+" "+ +  "NAME "+target+" " +ldopts*" "+" "+    "FIL "+Array.map(objects,fixpath)*","+" "+    libraries*" "+" ");   
196:    exit(1);    });    -  target=output+".exe"; -  +     if(getenv("CLEANUP")!="no")    rm(ldfile);    }
213:    }    }    -  if(operation == "link") +  if(operation == "link" && !share)    {    rm(output);    Stdio.write_file(output,