works for gcc
This commit is contained in:
parent
ae7ff555d9
commit
f5e4e6990b
3 changed files with 45 additions and 11 deletions
|
|
@ -4,5 +4,38 @@ const Watcom = new pmake.Compiler();
|
|||
Watcom.target = "Watcom";
|
||||
Watcom.description = "Open Watcom";
|
||||
|
||||
pmake.register(Watcom);
|
||||
Watcom.compile = function(target, obj, src) {
|
||||
function add_i(x) {
|
||||
return "-i=" + x;
|
||||
}
|
||||
|
||||
const includes = pmake.includes(target).map(add_i).join(" ");
|
||||
const flags = "-bt=nt -q " + includes + " -fo=" + obj + " " + src;
|
||||
|
||||
if(src.endsWith(".c")) {
|
||||
return "wcc386 " + flags;
|
||||
} else {
|
||||
return "wpp386 " + flags;
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
Watcom.link = function(target, files) {
|
||||
if(target instanceof pmake.LibraryProject) {
|
||||
} else if(target instanceof pmake.ExecutableProject) {
|
||||
function add_file(x) {
|
||||
return "file \"" + x + "\"";
|
||||
}
|
||||
|
||||
function add_library(x) {
|
||||
return "library \"" + x + "\"";
|
||||
}
|
||||
|
||||
return "wlink option quiet system nt name " + this.output(target) + " " + files.map(add_file).join(" ") + " " + pmake.libs(target).map(add_library).join(" ");
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
pmake.register(Watcom);
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue