Commit Graph

189 Commits

Author SHA1 Message Date
Martin Griffin
2f46a89b15
Merge pull request #2283 from mrgriffin/pret-incgfx
Some checks failed
CI / build (push) Has been cancelled
INCGFX: in-source arguments for gbagfx
2026-04-19 09:28:43 +01:00
Martin Griffin
fed3b0c81a Migrate INCBINs to INCGFX via migrate_incgfx.py
The exact command used to migrate source files was:
  git ls-files | grep 'src/.*\.[ch]$' | xargs grep -l INCBIN | xargs python3 migrate_incgfx.py

The Makefile rules were cleaned up manually by looking for graphics
rules and keeping only those ending with '\' (what the migration script
calls a "Multi-line rule"). You may think some of wallpaper rules could
be removed, but they're inputs for the '@cat $^ >$@' rules which are
currently unable to be migrated to 'INCGFX'.
2026-04-19 07:06:18 +01:00
Martin Griffin
df02d49e9b INCGFX: in-source arguments for gbagfx
'INCGFX' is like 'INCBIN' except that it specifies the arguments to pass
to 'gbagfx' which alleviates the user-unfriendliness caused by catch-all
rules.

Specifically, users frequently forget to add to 'spritesheet_rules.mk'
when adding object event graphics, and then the built '.4bpp' file is
not invalidated when the add their rule so they have to 'touch' the
source file or similar.

The built artifacts are placed in 'build/assets'.
2026-04-19 07:06:17 +01:00
Martin Griffin
041ff613ca
Generate '.d' files for 'maps.s' and 'map_events.s' (#2279)
Some checks failed
CI / build (push) Has been cancelled
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'
2026-04-07 09:03:44 -05:00
Marcus Huderle
d731ae90d8 Convert last 3 .s files to .midi
Some checks are pending
CI / build (push) Waiting to run
2026-03-21 09:35:45 -05:00
Marcus Huderle
d507b24ae9
Convert .aif files to .wav (#2213)
Some checks failed
CI / build (push) Has been cancelled
* Convert uncompress samples to .wav files, and introduce wav2agb with matching capabilities

Convert cries

Remove aif2pcm and cleanup wav2agb

* Add --no-pad option to support hq mixer

* Update wav2agb README

* Include the alignment padding in wav2agb

* cleanup
2025-12-01 09:01:26 -06:00
DizzyEggg
01fc7e76ef Fix wrong keep temps files directory in makefile 2025-06-22 11:26:31 +02:00
GriffinR
0c32d840fa
Merge pull request #2141 from pret/porymap-6
Update for Porymap 6
2025-05-27 10:53:17 -04:00
Kurausukun
bd0a02c456
Correct C23 Checks (#2144)
Some checks failed
CI / build (push) Has been cancelled
2025-05-19 15:43:06 +01:00
GriffinR
dbff8c4360
Merge branch 'porymap-6' into generate-map-constants 2024-12-09 20:25:41 -05:00
GriffinR
6560bbab21 Restore .map file creation
Some checks failed
CI / build (push) Has been cancelled
2024-11-23 14:17:40 -05:00
GriffinR
f04c2faeb0
Silence 'Nothing to be done for generated' messages (#2059)
Some checks are pending
CI / build (push) Waiting to run
2024-11-03 23:53:53 +01:00
GriffinR
0eb6d1d74c Merge branch 'porymap-6' of https://github.com/pret/pokeemerald into generate-map-constants 2024-10-15 22:04:45 -04:00
luckytyphlosion
a55c75d350
Get rid of common syms (#2040)
Some checks failed
CI / build (push) Has been cancelled
2024-10-14 23:52:11 -04:00
mid-kid
253d3dd7ef
Remove unnecessary looping for rule generation and unroll macros (#2046) 2024-10-14 23:47:07 -04:00
GriffinR
9f31b0fe90 Generate local IDs from map.json files 2024-10-12 03:04:24 -04:00
mid-kid
2c7964dbc2
Fix deleting files with dependency files (#2045) 2024-10-11 14:33:32 -04:00
GriffinR
8f41d9eb17
Merge branch 'master' into fix-toolchain 2024-09-19 12:20:51 -04:00
Kurausukun
52c2728ff6 remove gflib 2024-09-18 10:37:34 -04:00
GriffinR
b8c71fa84d Fix .d files not updating if .o fails, fix clean rule, remove some unnecessary warnings 2024-09-13 23:38:50 -04:00
GriffinR
7007439be8 Remove old ld_script processing 2024-09-12 13:50:47 -04:00
GriffinR
9e22bf1af4
Merge pull request #1957 from Icedude907/build-music-config
[Build System Rewrite] Improved audio rules
2024-09-12 10:46:30 -04:00
GriffinR
c265c3f837 Merge branch 'master' of https://github.com/pret/pokeemerald into build-music-config 2024-08-31 00:51:15 -04:00
GriffinR
2d5231149e Merge branch 'master' of https://github.com/pret/pokeemerald into build-scaninc-speed 2024-08-31 00:39:48 -04:00
GriffinR
19ad2e16ac Merge branch 'master' of https://github.com/pret/pokeemerald into build-makefile-cleanup 2024-08-31 00:17:07 -04:00
Icedude907
625a006cab
[Build System Rewrite] mapjson now takes output directory parameters. (#1949) 2024-08-29 14:01:01 -04:00
Philipp AUER
550e6688aa
Support C-Style enum in preproc (#1984)
* [preproc] C-style enums

- asm files parseable from stdin
- 2nd preproc pass
- add parser for C-style `enum`
- positional arguments at end of command

---------

Co-authored-by: sbird <sbird@no.tld>
Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
2024-07-13 18:26:33 +01:00
leo60228
ef2330593c
Don't assume bash is at /bin/bash 2024-05-29 19:32:17 -04:00
Icedude907
cf1eaea7f7 Coalesced audio rules into audio.mk 2023-11-15 13:36:35 +13:00
Icedude907
4b2054c3ea Parallel SCANINC via .d generation.
Secondary expansion is redundant.
2023-11-12 16:38:32 +13:00
Icedude907
a0bf504bc1 Linkerscript now tracks RAM/ROM usage 2023-11-12 15:24:10 +13:00
Icedude907
2198ca31c7 Reordered makefile.
Added some documentation and simplified dependency scanning.
2023-11-12 13:57:44 +13:00
Icedude907
7fa9819d9a Makefile uses make_tools, mapjson takes out dir.
Removed generated files (layouts.h, map_groups.h) from git.
2023-11-12 00:53:34 +13:00
quocmanh94
a093e402d5 Delete the redundant files generated after running build 2023-11-03 12:50:47 +07:00
Michael Panzlaff
2651401e6b Fix PATH for modern target for non dkp systems
When prepending something to PATH, we should use PATH=/foo/bar:$PATH
and not PATH=/foo/bar:PATH. Because your shell won't certainly find
something under the literal name PATH.

If one is not using devkitarm, TOOLCHAIN will resolve to an empty
string. If TOOLCHAIN is an empty string the only search path for the
modern gcc will be /bin which may work on some installations but is
probably not what was originally intended with this line. So let's just
search the standard search path if nothing can be found under $(TOOLCHAIN).

Either way, PATH is already set up previously, so we can make sure
MODERNCC is invoked properly by calling MODERNCC with PATH=$(PATH).
2023-06-08 12:42:17 +02:00
Eduardo Quezada
d00c8902f9 Whitelist instead of Blacklist for TOOLDIRS in Makefiles 2023-02-25 16:49:41 -03:00
Eduardo Quezada
65108c3192 Cleaned trailing whitespace 2022-09-11 14:14:49 -04:00
Kurausukun
0bda107188 don't build modern with -g by default 2022-04-20 01:07:10 -04:00
GriffinR
fd7457b05a Remove berry fix 2022-01-13 15:26:20 -05:00
luckytyphlosion
b3d66f5528 Merge branch 'master' of https://github.com/pret/pokeemerald 2021-07-02 12:53:12 -04:00
luckytyphlosion
9fd27fe855 Fix modern builds when devkitARM is not in PATH. 2021-07-02 12:52:31 -04:00
PikalaxALT
6ca73737cf Fix regex error 2021-06-18 12:53:15 -04:00
PikalaxALT
ae8f6e29f8 Symplifi symfiles 2021-06-16 14:43:35 -04:00
PikalaxALT
5ccac26f26 Port symfile implementation from Ruby, FireRed 2021-06-16 11:03:23 -04:00
luckytyphlosion
7e1ae9f95d Remove debug print statements in Makefile. 2021-06-03 18:22:49 -04:00
luckytyphlosion
4687847ace Fix building with KEEP_TEMPS=1, and NODEP=1.
KEEP_TEMPS=1 not working was due to the pattern substitution in the old makefile rules for compiling C files ($*) not working with the explicit generation of dependencies. NODEP=1 not working was due to the NODEP rule for src/%.s not being updated to use preproc and cpp.
2021-06-03 17:46:09 -04:00
luckytyphlosion
92152e45e2 Fixes to makefile.
Merge C_ASM_DEP and DATA_ASM_DEP, NODEP and SCAN_DEPS can be overridden, add --no-print-directory to MAKEFLAGS in make_tools.mk (also removed some unused variables), add newline to help message in preproc.
2021-06-01 23:22:15 -04:00
luckytyphlosion
f0b41debc3 Merge branch 'master' of https://github.com/pret/pokeemerald into remove-temps 2021-06-01 20:40:27 -04:00
luckytyphlosion
a839463c84 Optimize Makefile.
Don't do recursive makes for COMPARE and MODERN, use minimal makefile for making tools.
2021-06-01 20:40:11 -04:00
luckytyphlosion
c723d980e7 Merge branch 'master' of https://github.com/pret/pokeemerald 2021-05-23 10:51:26 -04:00