Here's the Making ColorzCore compatible with the CHAX makefile big thing list.
- Core shouldn't need the current directory to be EA's (it should be able to locate the stdlib/raws by looking at where the exe is)
- Core should support makefile dependency generation, through supporting the following command line options:
-M switches Core from assembling to just preprocessing, while monitoring includes and incbin for Make dependencies
-MM does as the above, ignoring files included from the EA directory (aka the stdlib)
-MD has Core both assemble and generate Make dependencies
-MMD combines -MM and -MD
-MF:<file>/-MF <file> sets the output file for makefile dependency generation (default is whatever)
-MT:<name>/-MT <name> adds a Make target
-MP adds a blank rule for each included file
-MG makes Core ignore includes/incbins for non-existant files (they're still added as Make dependencies)
Those options follow names and behavior of the pea ones, which generally follow names and behavior of the gcc/cpp ones.
The dependency output format is as follows:
<output ROM> [<extra target>...]: <input event> [<included>...]
# if -MP
<included>:;
...
File paths are relative to the calling working directory (or make it configurable?). Paths should probably be normalized to use unix-style dir separators (my version of Core doesn't do that which broke Windows builds of CHAX, oops)
Other less crucial stuff:
- 11.1 stuff (
-symOutput, and that's it I think, as a = expr is on the way)
- Core should return non-zero on failure
-input <file> instead of -input:<file>
-quiet
For reference, this is what CHAX uses (simplified):
HACK.gba: Main.event Main.d FE8U.gba
@cp -f FE8U.gba HACK.gba
@EA/Core A FE8 -output HACK.gba -input Main.event || (rm HACK.gba && false)
Main.d: Main.event
@EA/Core A FE8 -output HACK.gba -input Main.event -quiet -MM -MG -MT Main.d -MF Main.d
Here's the
Making ColorzCore compatible with the CHAX makefilebig thing list.-Mswitches Core from assembling to just preprocessing, while monitoring includes and incbin for Make dependencies-MMdoes as the above, ignoring files included from the EA directory (aka the stdlib)-MDhas Core both assemble and generate Make dependencies-MMDcombines-MMand-MD-MF:<file>/-MF <file>sets the output file for makefile dependency generation (default is whatever)-MT:<name>/-MT <name>adds a Make target-MPadds a blank rule for each included file-MGmakes Core ignore includes/incbins for non-existant files (they're still added as Make dependencies)Those options follow names and behavior of the
peaones, which generally follow names and behavior of thegcc/cppones.The dependency output format is as follows:
File paths are relative to the calling working directory (or make it configurable?). Paths should probably be normalized to use unix-style dir separators (my version of Core doesn't do that which broke Windows builds of CHAX, oops)
Other less crucial stuff:
-symOutput, and that's it I think, asa = expris on the way)-input <file>instead of-input:<file>-quietFor reference, this is what CHAX uses (simplified):