N.B. C++17 is required to build the asset processing program that we use (ZAPD), so check your OS version can support this before proceeding.
For macOS, use Homebrew to install the following dependencies:
- coreutils
- make
- python3
- libpng
- bash
- clang-format
You can install them with the following commands:
brew update
brew install coreutils make python3 libpng bash clang-format(The repository expects Homebrew-installed programs to be either linked correctly in $PATH etc. or in their default locations.)
The following instructions are written for MacOS users but should apply to any Unix-like system, with maybe some modifications at the end regarding the bash_profile.
Create destination dir for binutils
sudo mkdir -p /opt/crossCreate and enter local working dir
mkdir ~/binutils-tmp
cd ~/binutils-tmpGet and extract binutils source
wget https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
tar xjf binutils-2.35.tar.bz2(You may find this command does not work: if so, just access the URL in a browser and save it to ~/binutils-tmp.)
Create and enter a build directory
mkdir build-binutils
cd build-binutilsConfigure the build
../binutils-2.35/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werrorMake and install binutils
make -j
sudo make installEdit your ~/.bash_profile/~/.zsh_profile (or whichever shell you use) to add the new binutils binaries to the system PATH
echo "export PATH=$PATH:/opt/cross/bin" >> ~/.bash_profileReload ~/.bash_profile (or just launch a new terminal tab)
source ~/.bash_profileIf this worked, you can now delete the temporary directory ~/binutils-tmp.
Apple's version of make is very out-of-date, so you should use the brew-installed gmake in place of make in this repo from now on.
You should now be able to continue from step 2 of the Linux instructions.