aboutsummaryrefslogtreecommitdiff
path: root/crates/xa65/src/main.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-10 23:13:47 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-10 23:13:47 +0100
commit7a67a9d39150668fcec769040ee86803e2c34aea (patch)
tree7d60caf47464bc19b391383ce286b4c760c5c822 /crates/xa65/src/main.rs
parent5aec230fcd72f886f5aaa3333ac1e279f5010624 (diff)
downloadtools.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/xa65/src/main.rs')
-rw-r--r--crates/xa65/src/main.rs15
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);