Skip to content

Compiling (Linux)

Agent X edited this page Nov 28, 2024 · 7 revisions

Linux:

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

The build system has the following package requirements:

  • python3 >= 3.6
  • libsdl2-dev
  • libglew-dev
  • git
  • libcurl
  • zlib

Debian / Ubuntu - targeting 64 bits

sudo apt install build-essential git python3 libglew-dev libsdl2-dev libz-dev libcurl4-openssl-dev

Debian / Ubuntu - targeting 32 bits

sudo apt install build-essential git python3 libglew-dev:i386 libsdl2-dev:i386 libz-dev:i386 libcurl4-openssl-dev:i386

Fedora - targeting 64 bits

sudo dnf install make gcc python3 glew-devel SDL2-devel zlib-devel libcurl-devel

Fedora - targeting 32 bits

sudo dnf install python3.i686 glew-devel.i686 SDL2-devel.i686 zlib-devel.i686 libcurl-devel.i686

Arch Linux / SteamOS

sudo pacman -S base-devel glibc linux-api-headers python sdl2 glew zlib libglvnd libcurl-compat

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:

make -j

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