diff --git a/fish/functions/cross.fish b/fish/functions/cross.fish index acf9abe..0f42402 100644 --- a/fish/functions/cross.fish +++ b/fish/functions/cross.fish @@ -84,6 +84,25 @@ function cross --description 'Set up cross-compilation environment' set -gx OBJCPPXX $CXXPP set -gx IPHONEOS_DEPLOYMENT_TARGET 10.0 set -g cross_host $archs[1]-apple-darwin + case macos + if test -z "$retro68_path" + echo 'Please set retro68_path!' + return 1 + end + + set PATH $retro68_path/bin $PATH + + switch $argv[2] + case m68k + set -g cross_host m68k-apple-macos + case ppc + set -g cross_host powerpc-apple-macos + end + + if test (count $argv) != 2 -o -z "$cross_host" + echo 'Usage: cross macos m68k|ppc' + return 1 + end case mingw set -l pkg switch $argv[2]