Skip to content

Compiling (macOS Intel)

Agent X edited this page Jul 2, 2024 · 3 revisions

macOS Intel:

Setup the environment

Follow the Homebrew installation instructions here, pasting the given line in Terminal.

Download the source code

You can either download the source code for this project as a ZIP, or obtain it using git clone:

git clone https://github.com/coop-deluxe/sm64coopdx.git
cd sm64coopdx

Install dependencies

After installing homebrew, enter this command in the Rosetta terminal to install packages necessary to build sm64coopdx:

brew install make mingw-w64 gcc gcc@9 sdl2 pkg-config glew glfw3 libusb audiofile coreutils

Assembling libjuice (optional for 10.15 and above)

Run the following script to compile the libjuice library:

sh tools/mac-intel-essential.sh

Copy baserom for sound address extraction

While the ROM is no longer needed for extracting any copyrighted assets, it is still needed for the audio part of the compilation.

Get your vanilla US Super Mario 64 8 MB Z64 format ROM file and rename it to baserom.us.z64 before putting it in the root of the project (the same folder as the Makefile.)

If you have a ROM that matches the criteria above minus the file extension (if it's .v64 or .n64) then you can use this online ROM byteswapper to convert it into the .z64 file format.

Compilation

Finally, it's time to compile. in the terminal, navigate to the folder in which you cloned or downloaded sm64coopdx if you haven't already. Once you're there, run the following command:

gmake OSX_BUILD=1

OSX_BUILD must be specified as 1.

You can append build flags to your make invocation for any needed changes.