diff options
Diffstat (limited to 'task_cc.cc')
-rw-r--r-- | task_cc.cc | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -93,13 +93,25 @@ TaskCC::TaskCC(const BuildConfiguration& config, const Settings& settings, sourceFile = sourceDir; sourceFile /= source; - targetFile = settings.builddir / sourceFile.stem(); - targetFile += ".o"; + std::filesystem::path base = settings.builddir; + base /= config.target; + base += "-"; + base += sourceFile.stem(); - depsFile = settings.builddir / sourceFile.stem(); - depsFile += ".d"; + if(sourceFile.extension().string() == ".c") + { + base += "_c"; + } + else + { + base += "_cc"; + } - flagsFile = settings.builddir / sourceFile.stem(); + targetFile = base; + targetFile += ".o"; + depsFile = base; + depsFile += ".d"; + flagsFile = base; flagsFile += ".flags"; target_type = TargetType::Object; |