/// <summary> /// Updates the C++ project passed in with data from the MakeItSo.config file. /// </summary> private void updateProjectFromConfig_CPP(ProjectInfo_CPP project) { foreach (ProjectConfigurationInfo_CPP configuration in project.getConfigurationInfos()) { updateLibraries(configuration); updateLibraryPaths(configuration); updateIncludePaths(configuration); updatePreprocessorDefinitions(configuration); updateCompilerFlags(configuration); } }
/// <summary> /// Checks if any librararies need to be linked into projects /// because of implicit link rules via project dependencies. /// </summary> public void setupImplicitLinking() { foreach (ProjectInfo project in m_projectInfos.Values) { // We only need to set up implicit linking for C++ projects... ProjectInfo_CPP cppProject = project as ProjectInfo_CPP; if (cppProject != null) { cppProject.setupImplicitLinking(); } } }
/// <summary> /// Constructor /// </summary> private MakefileBuilder_Project_CPP(ProjectInfo_CPP project) { m_projectInfo = project; m_projectConfig = MakeItSoConfig.Instance.getProjectConfig(m_projectInfo.Name); try { // We create the file '[project-name].makefile', and set it to // use unix-style line endings... string path = String.Format("{0}/{1}.makefile", m_projectInfo.RootFolderAbsolute, m_projectInfo.Name); m_file = new StreamWriter(path, false); m_file.NewLine = "\n"; // We create variables... createCompilerVariables(); createIncludePathVariables(); createLibraryPathVariables(); createLibrariesVariables(); createPreprocessorDefinitionsVariables(); createImplicitlyLinkedObjectsVariables(); createCompilerFlagsVariables(); // We create an 'all configurations' root target... createAllConfigurationsTarget(); // We create one target for each configuration... createConfigurationTargets(); // We create a target to create the intermediate and output folders... createCreateFoldersTarget(); // Creates the target that cleans intermediate files... createCleanTarget(); } finally { if (m_file != null) { m_file.Close(); m_file.Dispose(); } } }
/// <summary> /// We create a makefile for the project passed in. /// </summary> public static void createMakefile(ProjectInfo_CPP project) { new MakefileBuilder_Project_CPP(project); }