From 901a8088e6b8bcbfdd7b0604b551fe6086651a6e Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 22 Nov 2000 20:19:15 +0000 Subject: [PATCH] New --cpu command line switch git-svn-id: svn://svn.cc65.org/cc65/trunk@468 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- doc/cl65.sgml | 1 + src/cl65/main.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/cl65.sgml b/doc/cl65.sgml index 5fd701ee4..ae12f9f05 100644 --- a/doc/cl65.sgml +++ b/doc/cl65.sgml @@ -58,6 +58,7 @@ Short options: Long options: --ansi Strict ANSI mode --asm-include-dir dir Set an assembler include directory + --cpu type Set cpu type --debug Debug mode --debug-info Add debug info --feature name Set an emulation feature diff --git a/src/cl65/main.c b/src/cl65/main.c index 2f2003eac..cad66f0ce 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -561,6 +561,7 @@ static void Usage (void) "Long options:\n" " --ansi\t\tStrict ANSI mode\n" " --asm-include-dir dir\tSet an assembler include directory\n" + " --cpu type\t\tSet cpu type\n" " --debug\t\tDebug mode\n" " --debug-info\t\tAdd debug info\n" " --feature name\tSet an emulation feature\n" @@ -594,6 +595,18 @@ static void OptAsmIncludeDir (const char* Opt, const char* Arg) +static void OptCPU (const char* Opt, const char* Arg) +/* Handle the --cpu option */ +{ + /* Add the cpu type to the assembler and compiler */ + CmdAddArg (&CA65, "--cpu"); + CmdAddArg (&CA65, Arg); + CmdAddArg (&CC65, "--cpu"); + CmdAddArg (&CA65, Arg); +} + + + static void OptDebug (const char* Opt, const char* Arg) /* Debug mode (compiler) */ { @@ -703,6 +716,7 @@ int main (int argc, char* argv []) static const LongOpt OptTab[] = { { "--ansi", 0, OptAnsi }, { "--asm-include-dir", 1, OptAsmIncludeDir }, + { "--cpu", 1, OptCPU }, { "--debug", 0, OptDebug }, { "--debug-info", 0, OptDebugInfo }, { "--feature", 1, OptFeature }, -- 2.39.5