From a07938f51e94935fdf8d995969314e8296eaa619 Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Tue, 17 Aug 2021 15:37:59 +0200 Subject: tools.make: add support of Windows MinGW --- xmake/modules/package/tools/make.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xmake/modules/package/tools/make.lua b/xmake/modules/package/tools/make.lua index b236b9da6..5c58d9de6 100644 --- a/xmake/modules/package/tools/make.lua +++ b/xmake/modules/package/tools/make.lua @@ -104,6 +104,10 @@ function build(package, configs, opt) -- do build if is_host("bsd") then os.vrunv("gmake", argv, {envs = opt.envs or buildenvs(package)}) + elseif package:is_plat("mingw") and is_subhost("windows") then + local mingw = assert(package:build_getenv("mingw") or package:build_getenv("sdk"), "mingw not found!") + local make = path.join(mingw, "bin", "mingw32-make.exe") + os.vrunv(make, argv, {envs = opt.envs or buildenvs(package)}) else os.vrunv("make", argv, {envs = opt.envs or buildenvs(package)}) end @@ -123,6 +127,10 @@ function install(package, configs, opt) end if is_host("bsd") then os.vrunv("gmake", argv, {envs = opt.envs or buildenvs(package)}) + elseif package:is_plat("mingw") and is_subhost("windows") then + local mingw = assert(package:build_getenv("mingw") or package:build_getenv("sdk"), "mingw not found!") + local make = path.join(mingw, "bin", "mingw32-make.exe") + os.vrunv(make, argv, {envs = opt.envs or buildenvs(package)}) else os.vrunv("make", argv, {envs = opt.envs or buildenvs(package)}) end -- cgit v1.3.1