(function() { const Watcom = new pmake.Compiler(); Watcom.target = "Watcom"; Watcom.description = "Open 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); })();