Add support for specifying target for dependencies
- Use <dependency target="target"> to specify which target the dependency should be compiled for. - Fix binary not being removed when doing makegen clean
This commit is contained in:
+5
-5
@@ -105,13 +105,13 @@ void Makefile::Save(ConfigFile& conf, unsigned int flags)
|
||||
outputFile << "-l" << *it << " ";
|
||||
}
|
||||
outputFile << std::endl;
|
||||
std::vector<std::string>& dependencies = conf.GetSettingVectorString(ConfigSetting::Dependency);
|
||||
const std::vector<Dependency>& dependencies = conf.GetDependencies();
|
||||
if (!dependencies.empty())
|
||||
{
|
||||
outputFile << "DEPENDENCIES=";
|
||||
for (auto it = dependencies.begin(); it != dependencies.end(); ++it)
|
||||
for (const auto& [path, target] : dependencies)
|
||||
{
|
||||
outputFile << *it << " ";
|
||||
outputFile << path << " ";
|
||||
}
|
||||
outputFile << std::endl;
|
||||
}
|
||||
@@ -157,8 +157,8 @@ void Makefile::Save(ConfigFile& conf, unsigned int flags)
|
||||
|
||||
// Clean
|
||||
outputFile << "clean:" << std::endl;
|
||||
outputFile << "\t$(info Removing $(OBJPATH))" << std::endl;
|
||||
outputFile << "\t@rm -rf $(OBJPATH)/" << std::endl;
|
||||
outputFile << "\t$(info Removing $(OBJPATH) and $(OUTPUT))" << std::endl;
|
||||
outputFile << "\t@rm -rf $(OBJPATH)/ $(OUTPUT)" << std::endl;
|
||||
|
||||
// Output file
|
||||
outputFile << "$(OUTPUT): $(OBJECTS)" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user