The compiler to use is automatically detected by the build system. We recommend using [Modern SDK](https://crashoveride95.github.io/modernsdk/startoff.html).
**N.B.** If using WSL, we strongly encourage you to clone into WSL's Linux filesystem using Linux's `git`.
Cloning into the Windows filesystem will result in much slower read/write speeds, and often causes issues when Windows copies the files with the wrong line endings, which the compiler IDO cannot handle correctly.
This will copy the GitHub repository contents into a new folder in the current directory called `HackerOoT`. Change into this directory before doing anything else:
Place a copy of the Master Quest (Debug) ROM inside the `baseroms/hackeroot-mq/` folder.
Rename the file to `baserom.z64`, `baserom.n64` or `baserom.v64`, depending on the original extension.
**NOTE:** to make a Wii VC build you will need to place a copy of the Ocarina of Time.wad file in this folder too, with the ``common-key.bin`` file. This project won't provide both.
#### 4. Setup the ROM and build process
Setup and extract everything from your ROM with the following command:
```bash
make setup
```
This downloads some dependencies (from pip), and compiles tools for the build process.
Then it generates a new ROM "baseroms/hackeroot-mq/baserom-decompressed.z64" that will have the overdump removed and the header patched.
It will also extract the individual assets from the ROM. This command will also setup F3DEX3 binaries.
**NOTE:** the decompressed baserom will be copied to ``baseroms/gc-eu-mq-dbg/``, this is a temporary solution.
#### 5. Build the ROM
Run make to build the ROM.
Make sure your path to the project is not too long, otherwise this process may error.
```bash
make
```
If all goes well, a new ROM should be built at `build/hackeroot-mq/hackeroot-mq.z64`.
**NOTE:** to speed up the build, you can either:
* pass `-jN` to `make setup` and `make`, where N is the number of threads to use in the build. The generally-accepted wisdom is to use the number of virtual cores your computer has.
* pass `-j` to `make setup` and `make`, to use as many threads as possible, but beware that this can use too much memory on lower-end systems.
Both of these have the disadvantage that the ordering of the terminal output is scrambled, so for debugging it is best to stick to one thread (i.e. not pass `-j` or `-jN`).