diff options
Diffstat (limited to 'task.cc')
-rw-r--r-- | task.cc | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -156,9 +156,16 @@ void Task::start() if(recompile) { - std::string cmd = - "g++ -MMD -c " + std::string(sourceFile) + " " + - config.cxxflags + " " + + std::string comp = "g++"; + std::string flags = config.cxxflags; + if(std::string(sourceFile.extension()) == ".c") + { + comp = "gcc"; + flags = config.cflags; + } + std::string cmd = comp + + " -MMD -c " + std::string(sourceFile) + " " + + flags + " " + "-o " + std::string(targetFile); std::cout << cmd << "\n"; |