You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
662 B
32 lines
662 B
void build(const char *filename,const char *lib = 0, const char *obj = 0)
|
|
{
|
|
|
|
|
|
if (obj!=0 && strlen(obj) )
|
|
{
|
|
|
|
TString s = gSystem->GetMakeSharedLib();
|
|
TString r(" $ObjectFiles ");
|
|
r.Append(obj);
|
|
s.ReplaceAll(" $ObjectFiles",r);
|
|
gSystem->SetMakeSharedLib(s);
|
|
|
|
}
|
|
|
|
if (lib && strlen(lib))
|
|
{
|
|
|
|
TString liblist(lib);
|
|
TObjArray *libs = liblist.Tokenize(" ");
|
|
TIter iter(libs);
|
|
TObjString *objstr;
|
|
while ( (objstr=(TObjString*)iter.Next()) )
|
|
{
|
|
gSystem->Load(objstr->String());
|
|
}
|
|
}
|
|
|
|
int result = gSystem->CompileMacro(filename,"kc");
|
|
if (!result) gApplication->Terminate(1);
|
|
|
|
}
|