mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-26 00:32:02 +00:00
45 lines
923 B
Bash
45 lines
923 B
Bash
SRC=$(readlink -f `dirname $0`)
|
|
mkdir -p binutils-build
|
|
mkdir -p toolchain
|
|
PREFIX=`pwd`/toolchain/
|
|
|
|
|
|
cd binutils-build
|
|
export CFLAGS=-Wno-unused-but-set-variable
|
|
$SRC/binutils/configure --target=m68k-unknown-elf --prefix=$PREFIX
|
|
make -j8
|
|
make install
|
|
|
|
cd ..
|
|
|
|
mkdir -p gcc-build
|
|
cd gcc-build
|
|
$SRC/gcc/configure --target=m68k-unknown-elf --prefix=$PREFIX --enable-languages=c,c++ --with-arch=m68k --with-cpu=m68000 --disable-libssp
|
|
make -j8
|
|
make install
|
|
|
|
cd ..
|
|
|
|
#mkdir -p newlib-build
|
|
#cd newlib-build
|
|
BINUTILS=$(readlink -f binutils-build)
|
|
|
|
mkdir -p elf2flt-build
|
|
cd elf2flt-build
|
|
$SRC/elf2flt/configure --target=m68k-unknown-elf --prefix=$PREFIX --with-binutils-build-dir=$BINUTILS
|
|
make -j8
|
|
make install
|
|
|
|
cd ..
|
|
|
|
rm -rf hfsutils
|
|
cp -r $SRC/hfsutils .
|
|
cd hfsutils
|
|
./configure --prefix=$PREFIX
|
|
make
|
|
make install
|
|
cd ..
|
|
|
|
runhaskell ../Retro68/PrepareHeaders.hs ../Retro68/Universal\ Headers toolchain/m68k-unknown-elf/include
|
|
|