diff options
| author | Jérôme Leclercq <[email protected]> | 2021-08-17 15:37:59 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-17 15:37:59 +0200 |
| commit | a07938f51e94935fdf8d995969314e8296eaa619 (patch) | |
| tree | 9fa5c6cdd6f2b4820afbbd684aa0cee07565cfb9 /xmake/modules/package/tools/make.lua | |
| parent | 5322929d89183b19f115e7418ffe1fc44bcbc78b (diff) | |
tools.make: add support of Windows MinGW
Diffstat (limited to 'xmake/modules/package/tools/make.lua')
| -rw-r--r-- | xmake/modules/package/tools/make.lua | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
