diff --git a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp index 7c5d1b5694c..06a274bf4b3 100644 --- a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp +++ b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp @@ -75,7 +75,7 @@ MSVCBackend::_generate_vcproj ( const Module& module ) vector imports; string module_type = GetExtension(module.GetTargetName()); - bool lib = (module.type == ObjectLibrary) || (module_type == ".lib") || (module_type == ".a"); + bool lib = (module.type == ObjectLibrary) || (module.type == RpcClient) ||(module.type == RpcServer) || (module_type == ".lib") || (module_type == ".a"); bool dll = (module_type == ".dll") || (module_type == ".cpl"); bool exe = (module_type == ".exe") || (module_type == ".scr"); bool sys = (module_type == ".sys"); @@ -532,9 +532,23 @@ MSVCBackend::_generate_vcproj ( const Module& module ) fprintf ( OUT, "\t\t\t\t\t\r\n" ); + string src = source_file.substr (0, source_file.find(".idl")); + + if ( src.find (".\\") != string::npos ) + src.erase (0, 2); + + fprintf ( OUT, "\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n" ); + + if ( module.type == RpcClient ) + fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"midl.exe /cstub %s.c /header %s.h "$(InputPath)" /out "$(IntDir)"", src.c_str (), src.c_str () ); + else + fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"midl.exe /sstub %s.c /header %s.h "$(InputPath)" /out "$(IntDir)"", src.c_str (), src.c_str () ); + + fprintf ( OUT, " "); + fprintf ( OUT, "cl.exe /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WIN32_WINNT=0x502" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Fo"$(IntDir)\\%s.obj" /W3 /c /Wp64 /ZI /TC "$(IntDir)\\%s.c" /nologo /errorReport:prompt", src.c_str (), src.c_str () ); + fprintf ( OUT, " "); + fprintf ( OUT, "lib.exe /OUT:"$(OutDir)\\%s.lib" "$(IntDir)\\%s.obj" \"\r\n", module.name.c_str (), src.c_str () ); + fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(IntDir)\\$(InputName).obj\"/>\r\n" ); } else if ((source_file.find(".asm") != string::npos || tolower(source_file.at(source_file.size() - 1)) == 's')) {