mirror of
https://github.com/bebbo/amiga-gcc.git
synced 2025-11-20 15:03:01 +00:00
support OSX sed
This commit is contained in:
16
sdk/install
16
sdk/install
@ -52,17 +52,19 @@ case $1 in
|
||||
name=${file%????}
|
||||
mkdir -p $3/m68k-amigaos/include/proto/
|
||||
$3/bin/sfdc --mode=proto --target=m68k-amigaos --output=$3/m68k-amigaos/include/proto/$name.h $3/m68k-amigaos/lib/sfd/$sfd || exit 1
|
||||
sed -e 's/\(<clib\/.*>\)/\L\1/' -e 's/\(<defines\/.*>\)/\L\1/' -e 's/\(<inline\/.*>\)/\L\1/' -e 's/\(<pragmas\/.*>\)/\L\1/' $3/m68k-amigaos/include/proto/$name.h -i
|
||||
sed -e 's/\(<clib\/.*>\)/\L\1/' -e 's/\(<defines\/.*>\)/\L\1/' -e 's/\(<inline\/.*>\)/\L\1/' -e 's/\(<pragmas\/.*>\)/\L\1/' $3/m68k-amigaos/include/proto/$name.h -i.bak
|
||||
rm $3/m68k-amigaos/include/proto/$name.h.bak
|
||||
mkdir -p $3/m68k-amigaos/include/inline/
|
||||
$3/bin/sfdc --mode=macros --target=m68k-amigaos --output=$3/m68k-amigaos/include/inline/$name.h $3/m68k-amigaos/lib/sfd/$sfd || exit 1
|
||||
mkdir -p $3/m68k-amigaos/include/lvo/
|
||||
$3/bin/sfdc --mode=lvo --target=m68k-amigaos --output=$3/m68k-amigaos/include/proto/$name.i $3/m68k-amigaos/lib/sfd/$sfd || exit 1
|
||||
if [ "${a[2]}" != "" ] && [ "${a[3]}" != "" ]; then
|
||||
echo fixup names from ${a[2]} to ${a[3]}
|
||||
echo sed -e "s/${a[2]}/${a[3]}/" $3/m68k-amigaos/include/proto/$name.h -i
|
||||
sed -e "s/${a[2]}/${a[3]}/" $3/m68k-amigaos/include/proto/$name.h -i
|
||||
sed -e "s/${a[2]}/${a[3]}/" $3/m68k-amigaos/include/proto/$name.i -i
|
||||
sed -e "s/${a[2]}/${a[3]}/" $3/m68k-amigaos/include/inline/$name.h -i
|
||||
echo sed -e "s/${a[2]}/${a[3]}/" $3/m68k-amigaos/include/proto/$name.h -i.bak
|
||||
sed -e "s/${a[2]}/${a[3]}/" $3/m68k-amigaos/include/proto/$name.h -i.bak
|
||||
sed -e "s/${a[2]}/${a[3]}/" $3/m68k-amigaos/include/proto/$name.i -i.bak
|
||||
sed -e "s/${a[2]}/${a[3]}/" $3/m68k-amigaos/include/inline/$name.h -i.bak
|
||||
rm $3/m68k-amigaos/include/proto/$name.h.bak $3/m68k-amigaos/include/proto/$name.i.bak $3/m68k-amigaos/include/inline/$name.h.bak
|
||||
fi
|
||||
;;
|
||||
stubs)
|
||||
@ -70,7 +72,7 @@ case $1 in
|
||||
file=$(basename $sfd)
|
||||
name=${file%????}
|
||||
$3/bin/sfdc --mode=autoopen --target=m68k-amigaos --output=build/$2/$name.c $3/m68k-amigaos/lib/sfd/$name.sfd || exit 1
|
||||
sed -e 's/__inline//g' -e 's/: \"d0\",/:/g' build/$2/$name.c -i || exit 1
|
||||
sed -e 's/__inline//g' -e 's/: \"d0\",/:/g' build/$2/$name.c -i.bak || exit 1
|
||||
echo $3/bin/m68k-amigaos-gcc -Os -noixemul -fomit-frame-pointer build/$2/$name.c -c
|
||||
$3/bin/m68k-amigaos-gcc -Os -noixemul -fomit-frame-pointer build/$2/$name.c -c -o build/$2/$name.o || exit 1
|
||||
echo $3/bin/m68k-amigaos-ar r $3/m68k-amigaos/lib/libstubs.a build/$2/$name.o
|
||||
@ -92,7 +94,7 @@ case $1 in
|
||||
file=$(basename $sfd)
|
||||
name=${file%????}
|
||||
$3/bin/sfdc --mode=stubs --target=m68k-amigaos --output=build/$2/lib$2.c $3/m68k-amigaos/lib/sfd/$name.sfd || exit 1
|
||||
sed -e 's/__inline//g' -e 's/: \"d0\",/:/g' build/$2/lib$2.c -i || exit 1
|
||||
sed -e 's/__inline//g' -e 's/: \"d0\",/:/g' build/$2/lib$2.c -i.bak || exit 1
|
||||
echo $3/bin/m68k-amigaos-gcc -Os -noixemul -fomit-frame-pointer build/$2/lib$2.c -c
|
||||
$3/bin/m68k-amigaos-gcc -Os -noixemul -fomit-frame-pointer build/$2/lib$2.c -c -o build/$2/lib$2.o || exit 1
|
||||
echo $3/bin/m68k-amigaos-ar r $3/m68k-amigaos/lib/lib$2.a build/$2/lib$2.o
|
||||
|
||||
Reference in New Issue
Block a user