Skip to content

Generate '.d' files for 'maps.s' and 'map_events.s'#2279

Merged
huderlem merged 1 commit intopret:masterfrom
mrgriffin:pret-data-maps-depfile
Apr 7, 2026
Merged

Generate '.d' files for 'maps.s' and 'map_events.s'#2279
huderlem merged 1 commit intopret:masterfrom
mrgriffin:pret-data-maps-depfile

Conversation

@mrgriffin
Copy link
Copy Markdown
Collaborator

Previously, data/maps.o and data/map_events.o were not rebuilt if any of the header files they #include are modified. You can verify this via make with something like:

$ make -n -W include/constants/songs.h | grep maps.o

which shows that data/maps.o is not rebuilt. Or by modifying a header included in data/maps.s in a way that should break assembling it (e.g. by removing a #define that is only used in data/maps.s).

Additionally, fixes a bug in Expansion from an interaction between preproc -e generating (global) symbols and those symbols being generated for multiple object files, and thus falling out of sync between (e.g.) data/map_events.o and data/event_scripts.o, resulting in an unhelpful multiple definition error from the linker like:

arm-none-eabi-ld: data/map_events.o: in function `ITEM_TM01':
(*ABS*+0x247): multiple definition of `ITEM_TM01'

Previously, 'data/maps.o' and 'data/map_events.o' were not rebuilt if
any of the header files they '#include' are modified. You can verify
this via 'make' with something like:
$ make -n -W include/constants/songs.h | grep maps.o
which shows that 'data/maps.o' is not rebuilt. Or by modifying a header
included in 'data/maps.s' in a way that should break assembling it (e.g.
by removing a '#define' that is only used in 'data/maps.s').

Additionally, fixes a bug in Expansion from an interaction between
'preproc -e' generating (global) symbols and those symbols being
generated for multiple object files, and thus falling out of sync
between (e.g.) 'data/map_events.o' and 'data/event_scripts.o', resulting
in an unhelpful multiple definition error from the linker like:
    arm-none-eabi-ld: data/map_events.o: in function `ITEM_TM01':
    (*ABS*+0x247): multiple definition of `ITEM_TM01'
@huderlem huderlem merged commit 041ff61 into pret:master Apr 7, 2026
1 check 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.

2 participants