From 7a67a9d39150668fcec769040ee86803e2c34aea Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 10 Jan 2025 23:13:47 +0100 Subject: xa65: Provide the target flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is meant for compatibility with ca65. Signed-off-by: Miquel Sabaté Solà --- crates/xa65/src/main.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'crates/xa65/src') 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, + /// Used for compatibility with 'ca65'. + #[arg(long)] + target: Option, + /// Place the output into the given 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); -- cgit v1.2.3