mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-18 04:45:39 +02:00
22 lines
524 B
Text
22 lines
524 B
Text
![]() |
#!/usr/bin/env ruby
|
||
|
|
||
|
HOST = `clang -dumpmachine`.strip
|
||
|
ARCH = HOST[/x86_64|arm64/]
|
||
|
|
||
|
def run_build(arch)
|
||
|
case arch
|
||
|
when "x86_64"
|
||
|
return system("make everything -f .Intel")
|
||
|
when "arm64"
|
||
|
code = system("make everything -f .AppleSilicon")
|
||
|
return code if !code
|
||
|
code = (system("arch -x86_64 make everything -f .Intel"))
|
||
|
return code if !code
|
||
|
return system("./make_macuniversal")
|
||
|
else
|
||
|
raise "Unsupported architecture"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
exit(run_build(ARCH) ? 0 : 1)
|