1
1
Fork 0

cross.fish: Add mingw32

This commit is contained in:
Jonathan Schleifer 2020-02-29 23:06:38 +00:00
parent c139f28683
commit 7e898ae2ac
2 changed files with 22 additions and 6 deletions

View file

@ -17,11 +17,6 @@ function cross --description 'Set up cross-compilation environment'
set -g cross_host arm-none-eabi set -g cross_host arm-none-eabi
set -g objfw_configure_flags --with-$argv[1] set -g objfw_configure_flags --with-$argv[1]
case amiga case amiga
if test (count $argv) != 2
echo 'Usage: cross amiga m68k|ppc'
return 1
end
switch $argv[2] switch $argv[2]
case m68k case m68k
if test -z "$amiga_gcc_path" if test -z "$amiga_gcc_path"
@ -87,6 +82,27 @@ function cross --description 'Set up cross-compilation environment'
set -gx OBJCPPXX $CXXPP set -gx OBJCPPXX $CXXPP
set -gx IPHONEOS_DEPLOYMENT_TARGET 10.0 set -gx IPHONEOS_DEPLOYMENT_TARGET 10.0
set -g cross_host $archs[1]-apple-darwin set -g cross_host $archs[1]-apple-darwin
case mingw32
set -l pkg
switch $argv[2]
case i686 x86_64
set pkg mingw-w64-$argv[2]-gcc
set -g cross_host $argv[2]-w64-mingw32
end
if test (count $argv) != 2 -o -z "$cross_host"
echo 'Usage: cross mingw i686|x86_64'
return 1
end
set -l prefix (pkg_info -qp $pkg | awk '/^@cwd/ { print $2; exit }')
if test -z "$prefix"
echo 'Please install $pkg from pkgsrc!'
return 1
end
set PATH $prefix/cross/$cross_host/bin $PATH
case morphos case morphos
set -l prefix (pkg_info -qp ppc-morphos-gcc-9 | set -l prefix (pkg_info -qp ppc-morphos-gcc-9 |
awk '/^@cwd/ { print $2; exit }') awk '/^@cwd/ { print $2; exit }')

2
zshrc
View file

@ -116,7 +116,7 @@ case $TERM in
unset_title() { unset_title() {
precmd() { precmd() {
print -Pn "\e]0;%m:%c\a" print -Pn "\e]0;%c · %m\a"
__precmd __precmd
} }
} }