diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-10 23:13:47 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-10 23:13:47 +0100 |
| commit | 7a67a9d39150668fcec769040ee86803e2c34aea (patch) | |
| tree | 7d60caf47464bc19b391383ce286b4c760c5c822 /crates | |
| parent | 5aec230fcd72f886f5aaa3333ac1e279f5010624 (diff) | |
| download | tools.nes-7a67a9d39150668fcec769040ee86803e2c34aea.tar.gz tools.nes-7a67a9d39150668fcec769040ee86803e2c34aea.zip | |
xa65: Provide the target flag
This is meant for compatibility with ca65.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/xa65/src/main.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/xa65/src/main.rs b/crates/xa65/src/main.rs index a937d24..5c06f5e 100644 --- a/crates/xa65/src/main.rs +++ b/crates/xa65/src/main.rs @@ -17,6 +17,10 @@ struct Args { #[arg(short = 'c', long)] config: Option<String>, + /// Used for compatibility with 'ca65'. + #[arg(long)] + target: Option<String>, + /// Place the output into the given <OUT> file. #[arg(short = 'o', long)] out: String, @@ -70,6 +74,17 @@ fn main() { }; let args = Args::parse(); + // Sanity check on the target flag from 'ca65'. + if let Some(target) = args.target { + if target != "nes" { + die(format!( + "the target has to be 'nes', but '{}' was provided instead", + target + )); + return; + } + } + // Generate a temporary directory in which both binary files will be placed // as an intermediate step. let random_string = &Alphanumeric.sample_string(&mut rand::thread_rng(), 16); |
