string\r
MingwModuleHandler::GetModuleArchiveFilename ( const Module& module ) const\r
{\r
- return ReplaceExtension ( module.GetPath ().c_str (),\r
+ return ReplaceExtension ( FixupTargetFilename(module.GetPath ()).c_str (),\r
".a" );\r
}\r
\r
dependencies += " ";\r
const Module* importedModule = module.project.LocateModule ( module.libraries[i]->name );\r
assert ( importedModule != NULL );\r
- dependencies += importedModule->GetPath ().c_str ();\r
+ dependencies += FixupTargetFilename(importedModule->GetPath ()).c_str ();\r
}\r
return dependencies;\r
}\r
string\r
MingwModuleHandler::GetObjectFilename ( const string& sourceFilename ) const\r
{\r
- return ReplaceExtension ( sourceFilename,\r
- ".o" );\r
+ return\r
+ FixupTargetFilename ( ReplaceExtension ( sourceFilename,\r
+ ".o" ) );\r
}\r
\r
string\r
void\r
MingwKernelModuleHandler::GenerateKernelModuleTarget ( const Module& module )\r
{\r
+ static string ros_junk ( "$(ROS_TEMPORARY)" );\r
+ //static string ros_output ( "$(ROS_INTERMEDIATE)" );\r
+ string target ( FixupTargetFilename(module.GetPath()) );\r
string workingDirectory = GetWorkingDirectory ( );\r
string archiveFilename = GetModuleArchiveFilename ( module );\r
string importLibraryDependencies = GetImportLibraryDependencies ( module );\r
+ string base_tmp = ros_junk + module.name + ".base.tmp";\r
+ string junk_tmp = ros_junk + module.name + ".junk.tmp";\r
+ string temp_exp = ros_junk + module.name + ".temp.exp";\r
fprintf ( fMakefile, "%s: %s %s\n",\r
- module.GetPath ().c_str (),\r
+ target.c_str (),\r
archiveFilename.c_str (),\r
importLibraryDependencies.c_str () );\r
fprintf ( fMakefile,\r
- "\t${gcc} -Wl,--base-file,%s" SSEP "base.tmp -o %s" SSEP "junk.tmp %s %s\n",\r
- workingDirectory.c_str (),\r
- workingDirectory.c_str (),\r
+ "\t${gcc} -Wl,--base-file,%s -o %s %s %s\n",\r
+ base_tmp.c_str (),\r
+ junk_tmp.c_str (),\r
archiveFilename.c_str (),\r
importLibraryDependencies.c_str () );\r
fprintf ( fMakefile,\r
- "\t${rm} %s" SSEP "junk.tmp\n",\r
- workingDirectory.c_str () );\r
+ "\t${rm} %s\n",\r
+ junk_tmp.c_str () );\r
fprintf ( fMakefile,\r
- "\t${dlltool} --dllname %s --base-file %s" SSEP "base.tmp --output-exp %s" SSEP "temp.exp --kill-at\n",\r
- module.GetPath ().c_str (),\r
- workingDirectory.c_str (),\r
- workingDirectory.c_str ());\r
+ "\t${dlltool} --dllname %s --base-file %s --output-exp %s --kill-at\n",\r
+ target.c_str (),\r
+ base_tmp.c_str (),\r
+ temp_exp.c_str ());\r
fprintf ( fMakefile,\r
- "\t${rm} %s" SSEP "base.tmp\n",\r
- workingDirectory.c_str () );\r
+ "\t${rm} %s\n",\r
+ base_tmp.c_str () );\r
fprintf ( fMakefile,\r
- "\t${ld} -Wl,%s" SSEP "temp.exp -o %s %s %s\n",\r
- workingDirectory.c_str (),\r
- module.GetPath ().c_str (),\r
+ "\t${ld} -Wl,%s -o %s %s %s\n",\r
+ temp_exp.c_str (),\r
+ target.c_str (),\r
archiveFilename.c_str (),\r
importLibraryDependencies.c_str () );\r
fprintf ( fMakefile,\r
- "\t${rm} %s" SSEP "temp.exp\n",\r
- workingDirectory.c_str () );\r
+ "\t${rm} %s\n",\r
+ temp_exp.c_str () );\r
\r
GenerateArchiveTarget ( module );\r
GenerateObjectFileTargets ( module );\r