Changeset 1900 in Sophya for trunk/SophyaLib/SysTools/cxxcmplnk.cc
- Timestamp:
- Feb 15, 2002, 6:35:01 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SysTools/cxxcmplnk.cc
r1797 r1900 36 36 37 37 /* --Methode-- */ 38 CxxCompilerLinker::CxxCompilerLinker( )38 CxxCompilerLinker::CxxCompilerLinker(bool fglibsophya, bool fglibextsophya, bool fglibpi) 39 39 : verbose(false) 40 40 { … … 92 92 #endif 93 93 94 #ifndef Darwin 95 linkCmd = compCmd; 96 #else 97 linkCmd = "cc -bundle -flat_namespace -undefined suppress "; 98 linkOptions = "-L/usr/lib/gcc/darwin/default -lstdc++ -lcc_dynamic -lpthread -lm"; 99 #endif 100 94 101 cppFlags += " -I. "; 95 102 compOptions += " -c "; … … 102 109 if (dpcbase[dpcbase.length()-1] != '/') dpcbase += '/'; 103 110 cppFlags += ( " -I" + dpcbase + "Include/ "); 104 linkOptions += " -L" + dpcbase + syscomp + "ShLibs/ -lextsophya -lsophya -lm "; 111 linkOptions += " -L" + dpcbase + syscomp + "ShLibs/"; 112 if (fglibsophya) linkOptions += " -lsophya "; 113 if (fglibextsophya) linkOptions += " -lextsophya "; 114 if (fglibpi) linkOptions += " -lPI "; 105 115 } 106 116 … … 151 161 int CxxCompilerLinker::BuildSO(string const & oname, string & soname) 152 162 { 163 // char * soext = ".dylib"; if defined(Darwin) - pas necessaire Reza 02/2002 164 char * soext = ".so"; 165 153 166 if (soname.length() < 1) { 154 167 size_t l,p,q; … … 158 171 else p++; 159 172 q = oname.find('.'); 160 if (q < l) soname = tmpDir + oname.substr(p, q-p) + ".so";161 else soname = tmpDir + oname.substr(p) + ".so";173 if (q < l) soname = tmpDir + oname.substr(p, q-p) + soext; 174 else soname = tmpDir + oname.substr(p) + soext; 162 175 } 163 176 string cmd; 164 cmd = compCmd + linkOptions + "-o " + soname + " " + oname;177 cmd = linkCmd + " " + oname + " " + linkOptions + " -o " + soname + " " ; 165 178 if (verbose) 166 179 cout << "CxxCompilerLinker::BuildSO() - Executing \n" << cmd << endl;
Note:
See TracChangeset
for help on using the changeset viewer.