Skip to content

Feature Request: Implement features that allow for an easier make/EA setup (à la CHAX) #8

@StanHash

Description

@StanHash

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions