midas/pmake.js

38 lines
861 B
JavaScript
Raw Normal View History

2026-05-11 03:25:34 +09:00
function main() {
2026-05-10 07:03:11 +09:00
pmake.subdirectory("external/ppr");
pmake.subdirectory("external/stb");
2026-05-11 03:25:34 +09:00
const IDE = new pmake.ExecutableProject("midas");
IDE.sources = fs.glob("src/*.c", "src/icon/*.c");
IDE.includes = [ "src", main.milsko + "/include" ];
IDE.libdirs = [ main.milsko + "/src", main.milsko + "/lib" ];
IDE.libraries = [ "stb", "ppr", "Mw" ];
2026-05-10 07:03:11 +09:00
pmake.register(IDE);
}
main.milsko = "/usr/local";
2026-05-11 03:25:34 +09:00
(function() {
2026-05-12 08:59:46 +09:00
var opt;
2026-05-11 03:25:34 +09:00
opt = new pmake.Option("with-milsko=PATH");
opt.category = "General";
2026-05-10 07:03:11 +09:00
opt.description = "Specify path to milsko";
2026-05-11 03:25:34 +09:00
opt.action = function(value) {
2026-05-10 07:03:11 +09:00
main.milsko = value;
};
2026-05-12 08:59:46 +09:00
pmake.register(opt);
opt = new pmake.Option("with-mingw=PREFIX");
opt.category = "General";
opt.description = "Use MinGW";
opt.action = function(value) {
pmake.compiler.prefix = value;
pmake.setSystem("Windows");
};
2026-05-10 07:03:11 +09:00
pmake.register(opt);
})();