$(ECHO_RBUILD)
$(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs8.00 msvc
-.PHONY: msvc6
+.PHONY: msvc6_clean
msvc6_clean: $(RBUILD_TARGET)
$(ECHO_RBUILD)
$(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -c -vs6.00 msvc
-.PHONY: msvc7
+.PHONY: msvc7_clean
msvc7_clean: $(RBUILD_TARGET)
$(ECHO_RBUILD)
$(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -c -vs7.00 msvc
-.PHONY: msvc71
+.PHONY: msvc71_clean
msvc71_clean: $(RBUILD_TARGET)
$(ECHO_RBUILD)
$(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -c -vs7.10 msvc
-.PHONY: msvc8
+.PHONY: msvc8_clean
msvc8_clean: $(RBUILD_TARGET)
$(ECHO_RBUILD)
$(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -c -vs8.00 msvc
$(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -c -vs7.10 msvc
$(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -c -vs8.10 msvc
+.PHONY: msvc7_install_debug
+msvc7_install_debug: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs7.00 -vcdebug msvc
+
+.PHONY: msvc7_install_release
+msvc7_install_release: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs7.00 -vcrelease msvc
+
+.PHONY: msvc7_install_speed
+msvc7_install_speed: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs7.00 -vcspeed msvc
+
+.PHONY: msvc71_install_debug
+msvc71_install_debug: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs7.10 -vcdebug msvc
+
+.PHONY: msvc71_install_release
+msvc71_install_release: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs7.10 -vcrelease msvc
+
+
+.PHONY: msvc71_install_speed
+msvc71_install_speed: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs7.10 -vcspeed msvc
+
+.PHONY: msvc8_install_debug
+msvc8_install_debug: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs8.00 -vcdebug msvc
+
+.PHONY: msvc8_install_release
+msvc8_install_release: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs8.00 -vcrelease msvc
+
+.PHONY: msvc8_install_speed
+msvc8_install_speed: $(RBUILD_TARGET)
+ $(ECHO_RBUILD)
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -vs8.00 -vcspeed msvc
+
.PHONY: makefile_auto_clean
makefile_auto_clean:
-@$(rm) $(ROS_AUTOMAKE) $(PREAUTO) 2>$(NUL)
_clean_project_files();\r
return;\r
}\r
-\r
+ if ( configuration.InstallFiles ) {\r
+ _install_files( _get_vc_dir(), configuration.VSConfigurationType );\r
+ return;\r
+ }\r
string filename_sln ( ProjectNode.name );\r
//string filename_rules = "gccasm.rules";\r
\r
remove ( filename_dsw.c_str () );\r
}\r
\r
+bool\r
+MSVCBackend::_copy_file ( const std::string& inputname, const std::string& targetname ) const\r
+{\r
+ FILE * input = fopen ( inputname.c_str (), "rb" );\r
+ if ( !input )\r
+ return false;\r
+\r
+ FILE * output = fopen ( targetname.c_str (), "wb+" );\r
+ if ( !output )\r
+ {\r
+ fclose ( input );\r
+ return false;\r
+ }\r
+\r
+ char buffer[256];\r
+ int num_read;\r
+ while ( (num_read = fread( buffer, sizeof(char), 256, input) ) || !feof( input ) )\r
+ fwrite( buffer, sizeof(char), num_read, output );\r
+\r
+ fclose ( input );\r
+ fclose ( output );\r
+ return true;\r
+}\r
+\r
+void\r
+MSVCBackend::_install_files (const std::string& vcdir, const::string& config)\r
+{\r
+ for ( size_t i = 0; i < ProjectNode.modules.size(); i++ )\r
+ {\r
+ Module& module = *ProjectNode.modules[i];\r
+ if ( module.installBase == "" || module.installName == "" )\r
+ continue;\r
+\r
+ string inputname = Environment::GetOutputPath () + "\\" + module.GetBasePath () + "\\" + vcdir + "\\" + config + "\\" + module.GetTargetName ();\r
+ string installdir = Environment::GetInstallPath () + "\\" + module.installBase + "\\" + module.installName;\r
+ if ( _copy_file( inputname, installdir ) )\r
+ printf ("Installed File :'%s'\n",installdir.c_str () );\r
+ }\r
+}\r
std::string vcproj_guid );\r
void _clean_project_files ( void );\r
void _get_object_files ( const Module& module, std::vector<std::string>& out ) const;\r
+ void _install_files ( const std::string& vcdir, const std::string& config );\r
+ bool _copy_file ( const std::string& inputname, const std::string& targetname ) const;\r
};\r
\r
#endif // __MSVC_H__\r
// this code is deactivated untill the tree builds fine with msvc\r
// --- is appended to each library path which is later\r
// replaced by the configuration\r
- // i.e. ../output-i386/lib/rtl/---/rtl.lib becomes\r
- // ../output-i386/lib/rtl/Debug/rtl.lib \r
+ // i.e. ../output-i386/lib/rtl/vcXX/---/rtl.lib becomes\r
+ // ../output-i386/lib/rtl/vcXX/Debug/rtl.lib \r
// etc\r
- libs[i]->importedModule->\r
- string libpath = outdir + "\\" + libs[i]->importedModule->GetBasePath() + "\\---\\" + libs[i]->name + ".lib";\r
+ string libpath = outdir + "\\" + libs[i]->importedModule->GetBasePath() + "\\" + _get_vc_dir() + "\\---\\" + libs[i]->name + ".lib";\r
libraries.push_back ( libpath );\r
#else\r
libraries.push_back ( libs[i]->name + ".lib" );\r
CompilationUnitsEnabled = true;
MakeHandlesInstallDirectories = false;
GenerateProxyMakefilesInSourceTree = false;
+ InstallFiles = false;
}
Configuration::~Configuration ()
(property->value == non_if_data.ifs[i]->value);
if ( conditionTrue )
non_if_data.ifs[i]->data.ExtractModules( modules );
+ else
+ {
+ If * if_data = non_if_data.ifs[i];
+ non_if_data.ifs.erase ( non_if_data.ifs.begin () + i );
+ delete if_data;
+ }
}
for ( i = 0; i < linkerFlags.size (); i++ )
linkerFlags[i]->ProcessXML ();
if (configuration.VSProjectVersion.length() == 3) //7.1
configuration.VSProjectVersion.append("0");
+ break;
+ case 'c':
+ configuration.VSConfigurationType = string (&switchStart[3]);
+ configuration.InstallFiles = true;
break;
default:
printf ( "Unknown switch -d%c\n",
switch ( switchChar )
{
case 'v':
- if (switchChar2 == 's')
+ if (switchChar2 == 's' || switchChar2 == 'c' )
{
return ParseVCProjectSwitch (
switchChar2,
bool CompilationUnitsEnabled;
std::string CheckDependenciesForModuleOnlyModule;
std::string VSProjectVersion;
+ std::string VSConfigurationType;
bool MakeHandlesInstallDirectories;
bool GenerateProxyMakefilesInSourceTree;
+ bool InstallFiles;
};
class Environment