As the title says, I've created (hopefully) detailed enough instruction for building the game. Let me know if I've missed anything!
2.3 KiB
2.3 KiB
Requirements
- A Super Metroid rom (Make sure to rename it to
sm.smc) - libsdl2-dev
For Linux/MacOS you must install these for your desired OS:
- Ubuntu/Debian:
sudo apt install libsdl2-dev - Fedora Linux:
sudo dnf in sdl2-devel - Arch Linux:
sudo pacman -S sdl2 - macOS:
brew install sdl2
Windows
Building with MSYS2
Dependencies and requirements:
Note: Make sure you're using MINGW64, otherwise it won't work.
- The
libsdl2-devlibrary - MSYS2
- Install MSYS2 on your machine.
- Clone the SM repository.
git clone https://github.com/snesrev/sm - Place the copy of your rom in the main directory.
- Install
libsdl2-devwithsdl2-config --cflags - After that it outputs
-IC:/msys64/mingw64/include/SDL2 -Dmain=SDL_main, typesdl2-config --libs, it should output-LC:/msys64/mingw64/lib -lmingw32 -mwindows -lSDL2main -lSDL2 - Now install Make and GCC, type
pacman -S make && pacman -S mingw-w64-x86_64-gcc
NOTE: Make sure you're in the sm directory.
After you've done installing everything, cd to sm folder. Type make
In order to speed up the compilation, type make -j16
Building with Visual Studio
Dependencies and requirements:
- The
libsdl2-devlibrary, which is automatically installed with NuGet. - Visual Studio Community 2022
Download VS installer. On installer prompt, make sure you're on "Workloads" and check Desktop Development with C++ this will install the necessary deps for compilation.
- Open
sm.slnsolution. - Change the build target from
DebugtoRelease - Build the solution.
Building with Tiny C Compiler
Dependencies and requirements:
- Unzip both TCC and SDL and place them in
third_partyfolder. - Double click
run_with_tcc.bat - Wait for it to compile and the game will automatically boot-up.
Linux/MacOS
Cd to your SM root folder and open the terminal and type:
make
For more advanced usage:
make -j$(nproc) # run on all core
make clean all # clear gen+obj and rebuild
CC=clang make # specify compiler