works for gcc
This commit is contained in:
parent
ae7ff555d9
commit
f5e4e6990b
3 changed files with 45 additions and 11 deletions
|
|
@ -146,20 +146,19 @@ POSIXCompiler.prototype.compile = function(target, obj, src) {
|
|||
return "-I" + x;
|
||||
}
|
||||
|
||||
const includes = pmake.includes(target).map(add_i)
|
||||
|
||||
if(includes.length > 0) includes = " " + includes.join(" ");
|
||||
const includes = pmake.includes(target).map(add_i).join(" ");
|
||||
const flags = includes + " -c -o " + obj + " " + src;
|
||||
|
||||
if(src.endsWith(".c")) {
|
||||
return this.prefix + this.cc + includes + " -c -o " + obj + " " + src;
|
||||
return this.prefix + this.cc + " " + flags;
|
||||
} else if(is_cxx(src)) {
|
||||
return this.prefix + this.cxx + includes + " -c -o " + obj + " " + src;
|
||||
return this.prefix + this.cxx + " " + flags;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
POSIXCompiler.prototype.link = function(target, files) {
|
||||
POSIXCompiler.prototype.link = function(target, files) {
|
||||
if(target instanceof pmake.LibraryProject) {
|
||||
return this.prefix + this.ar + " rcs " + this.output(target) + " " + files.join(" ");
|
||||
} else if(target instanceof pmake.ExecutableProject) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue