diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp index 7a96a6fdcd7..2507b792cda 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp @@ -558,6 +558,10 @@ MingwModuleHandler::GenerateLinkerCommand ( const Module& module, importLibraryDependencies.c_str (), GetLinkerMacro ( module ).c_str () ); + fprintf ( fMakefile, + "\t${rm} %s\n", + junk_tmp.c_str () ); + fprintf ( fMakefile, "\t${dlltool} --dllname %s --base-file %s --def %s --output-exp %s --kill-at\n", targetName.c_str (), @@ -565,6 +569,10 @@ MingwModuleHandler::GenerateLinkerCommand ( const Module& module, FixupTargetFilename ( module.GetBasePath () + SSEP + module.importLibrary->definition ).c_str (), temp_exp.c_str () ); + fprintf ( fMakefile, + "\t${rm} %s\n", + base_tmp.c_str () ); + fprintf ( fMakefile, "\t%s %s %s -o %s %s %s %s\n\n", linker.c_str (), @@ -574,6 +582,10 @@ MingwModuleHandler::GenerateLinkerCommand ( const Module& module, objectFilenames.c_str (), importLibraryDependencies.c_str (), GetLinkerMacro ( module ).c_str () ); + + fprintf ( fMakefile, + "\t${rm} %s\n\n", + temp_exp.c_str () ); } else {