Skip to content

Automatically build tools required to compile#132

Merged
biosp4rk merged 4 commits into
metroidret:masterfrom
0xb01u:autobuild_tools
Jan 27, 2026
Merged

Automatically build tools required to compile#132
biosp4rk merged 4 commits into
metroidret:masterfrom
0xb01u:autobuild_tools

Conversation

@0xb01u
Copy link
Copy Markdown
Contributor

@0xb01u 0xb01u commented Jan 24, 2026

Fixes #131.

Heavily inspired by pokeemerald's build process.

I am no Makefile expert by any means, and whatever I used to know is a bit rusty nowadays. So there may be cleaner ways of achieving the same result. But I think this is good enough, and makes the compilation slightly more convenient. I am open to suggestions on how to improve the PR, though.

Also adds support for in-project agbcc installation (using its install.sh script), instead of requiring to add agbcc to the $PATH. Either of those options works now. (I find it more convenient.)

Comment thread make_tools.mk Outdated
MAKEFLAGS += --no-print-directory

TOOLS_DIR := tools
# Tool executables tu build
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

@0xb01u
Copy link
Copy Markdown
Contributor Author

0xb01u commented Jan 24, 2026

Oh, also, one advantage this solution has is that it is easily extensible to other tools. We currently only have gbafix and preproc as pre-build requirements. But, for example, if we added tools for data, image or sound processing, and they had a Makefile, we would just have to add them to make_tools.mk for them to be built automatically.

@0xb01u
Copy link
Copy Markdown
Contributor Author

0xb01u commented Jan 25, 2026

Ah, btw, this does not automatically extract the data from the ROM. That part was not automatized, and is required to be done before compiling (e.g., make extract && make).

Let me know if you would like to have that automatized too, and I'll update the PR.

@biosp4rk biosp4rk merged commit a81dc8b into metroidret:master Jan 27, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main makefile assumes preproc is already built

2 participants