Lines Matching refs:file
14 public function can_handle($project, $file) { argument
15 $name = $file->name();
18 if ($project->file($cpp) != NULL) return true;
20 if ($project->file($c) != NULL) return true;
27 protected function dependency($project, $file) { argument
28 $deps = $file->dependency();
29 $cpp = $this->replace_extension($file->name(), ".o", ".cpp");
30 if ($project->file($cpp) != NULL && !in_array($cpp, $deps)) {
34 $c = $this->replace_extension($file->name(), ".o", ".c");
35 if ($project->file($c) != NULL && !in_array($c, $deps)) {
45 protected function recipe($project, $file) { argument
46 $cpp = $this->replace_extension($file->name(), ".o", ".cpp");
47 if ($project->file($cpp) != NULL)
48 return "g++ -O3 -c -I. -o " . $file->name() . " $cpp";
49 $c = $this->replace_extension($file->name(), ".o", ".c");
50 if ($project->file($c) != NULL)
51 return "gcc -O3 -c -I. -o " . $file->name() . " $c";