Index: /trunk/Mars/macros/rootlogon.C
===================================================================
--- /trunk/Mars/macros/rootlogon.C	(revision 14889)
+++ /trunk/Mars/macros/rootlogon.C	(revision 14890)
@@ -179,10 +179,16 @@
     gInterpreter->AddIncludePath(dir+"mextralgo");
 
-    TString options = " -O3 -DHAVE_ZLIB -D__MARS__ -pipe -Wall -Woverloaded-virtual -fno-exceptions -fPIC ";
+    TString opt(gSystem->GetFlagsOpt());
+    TString lib(gSystem->GetLinkedLibs());
 
-    TString s = "cd $BuildDir ; ";
-    s += "g++ -std=c++0x -c" + options + "-Iinclude -D_REENTRANT $IncludePath $SourceFiles ; ";
-    s += "g++ -std=c++0x $ObjectFiles -shared -Wl,-soname,$LibName.so -O -o $SharedLib";
-    gSystem->SetMakeSharedLib(s);
+    opt += " -D__MARS__";
+//    opt += " -DHAVE_ZLIB";
+    opt += " -std=c++0x";
+
+//    lib += " -lz";
+
+    gSystem->SetLinkedLibs(lib);
+    gSystem->SetFlagsOpt(opt);
+
 
     cout << "\033[32m" << "Welcome to the Mars Root environment." << "\033[0m" << endl;
