* #ifndef ENVIRONMENT_H_ -> #ifndef ENVIRONMENT_H (remove trailing underscore) * rm from makefile suggestion about additional assets/ folder (just use assets/) * BgCheck_AnyLineTest 1-3 : change 0/1 args in calls to false/true * func_8083C6B8 returns bool * parens cleanup * fix typos * cleanup UNK_TYPE uses * fix ACTOR_ID_MAX value comment * EnDh.limbRotTable -> morphTable * some xml formatting * bool -> s32 * shadowAlpha = 0xFF -> 255 * EnRu1_SetPlatformCamSetting/EnRu1_GetPlatformCamSetting: use CAM_SET_ * rm leading & in extracted references to jfif data arrays * remove references to zapd * gPoeComposerFlatHeadDL_000060E0_Tex -> object_po_composer_000060E0_Tex in HACK_no_warn_bad_dims_Texs * correct SKYBOX_CUTSCENE_MAP comment
2.9 KiB
Building on macOS
1. Dependencies
For macOS, use Homebrew to install the following dependencies:
- coreutils
- make
- python3
- bash
- clang-format
- libxml2
- libiconv
You can install them with the following commands:
brew update
brew install coreutils make python3 bash clang-format libxml2 libiconv
(The repository expects Homebrew-installed programs to be either linked correctly in $PATH etc. or in their default locations.)
2. Building mips-linux-binutils
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/cross
Create and enter local working dir
mkdir ~/binutils-tmp
cd ~/binutils-tmp
Get and extract binutils source
curl -O https://ftp.gnu.org/gnu/binutils/binutils-2.46.0.tar.xz
tar xjf binutils-2.46.0.tar.xz
Create and enter a build directory
mkdir build-binutils
cd build-binutils
Configure the build
../binutils-2.46.0/configure --target=mips-linux-gnu --prefix=/opt/cross --with-system-zlib --disable-gprof --disable-gdb --disable-werror
Make and install binutils
make -j$(nproc)
sudo make install
Edit your ~/.bash_profile/~/.zprofile (or whichever shell you use) to add the new binutils binaries to the system PATH
echo 'export PATH="$PATH:/opt/cross/bin"' >> ~/.bash_profile
Reload ~/.bash_profile (or just launch a new terminal tab)
source ~/.bash_profile
If this worked, you can now delete the temporary directory ~/binutils-tmp.
3. Final note
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.
4. Building GCC (optional)
If you'd like to compile with GCC instead of IDO (e.g. for modding), you can build it from source similarly to how we built binutils:
Install dependences
brew install gcc@15 gmp isl libmpc mpfr
Create and enter local working dir
mkdir ~/gcc-tmp
cd ~/gcc-tmp
Get and extract gcc source
curl -O https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz
tar xvf gcc-15.2.0.tar.xz
Create and enter a build directory
mkdir build-gcc
cd build-gcc
Configure the build
CC=gcc-15 CXX=g++-15 ../gcc-15.2.0/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-nls --enable-languages=c --with-gmp=$(brew --prefix)/opt/gmp --with-mpfr=$(brew --prefix)/opt/mpfr --with-mpc=$(brew --prefix)/opt/libmpc --with-isl=$(brew --prefix)/opt/isl
Make and install gcc
CC=gcc-15 CXX=g++-15 make all-gcc -j$(nproc)
sudo make install-gcc
If this worked, you can now delete the temporary directory ~/gcc-tmp.