This commit is contained in:
Nishi 2026-05-09 16:57:33 +09:00
commit fac750a2b3
Signed by: nishi
GPG key ID: 27EF69B208EB9343
4 changed files with 31 additions and 4 deletions

View file

@ -4,7 +4,15 @@ const Watcom = new pmake.Compiler();
Watcom.target = "Watcom";
Watcom.description = "Open Watcom";
Watcom.compile = function(target, obj, src) {
Watcom.output = function(target) {
if(target instanceof pmake.LibraryProject) {
return target.output + ".lib";
}
return pmake.Compiler.prototype.output.call(this, target);
}
Watcom.compile = function(target, obj, src) {
function add_i(x) {
return "-i=" + x;
}
@ -22,6 +30,7 @@ Watcom.compile = function(target, obj, src) {
Watcom.link = function(target, files) {
if(target instanceof pmake.LibraryProject) {
return "wlib -q -b -n -fo " + this.output(target) + " " + files.join(" ");
} else if(target instanceof pmake.ExecutableProject) {
function add_file(x) {
return "file \"" + x + "\"";
@ -35,7 +44,7 @@ Watcom.link = function(target, files) {
}
return "";
}
};
pmake.register(Watcom);
pmake.register(Watcom);
})();