/* */
/* */
/* */
-/* (C) 2000-2010, Ullrich von Bassewitz */
+/* (C) 2000-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
" -Os\t\t\t\tInline some known functions\n"
" -T\t\t\t\tInclude source as comment\n"
" -V\t\t\t\tPrint the compiler version number\n"
- " -W\t\t\t\tSuppress warnings\n"
+ " -W warning[,...]\t\tSuppress warnings\n"
" -d\t\t\t\tDebug mode\n"
" -g\t\t\t\tAdd debug info to object file\n"
" -h\t\t\t\tHelp (this text)\n"
" --help\t\t\tHelp (this text)\n"
" --include-dir dir\t\tSet an include directory search path\n"
" --list-opt-steps\t\tList all optimizer steps and exit\n"
+ " --list-warnings\t\tList available warning types for -W\n"
" --local-strings\t\tEmit string literals immediately\n"
" --memory-model model\t\tSet the memory model\n"
" --register-space b\t\tSet space available for register variables\n"
DefineNumericMacro ("__APPLE2ENH__", 1);
break;
- case TGT_GEOS:
+ case TGT_GEOS_CBM:
/* Do not handle as a CBM system */
DefineNumericMacro ("__GEOS__", 1);
+ DefineNumericMacro ("__GEOS_CBM__", 1);
+ break;
+
+ case TGT_GEOS_APPLE:
+ DefineNumericMacro ("__GEOS__", 1);
+ DefineNumericMacro ("__GEOS_APPLE__", 1);
break;
case TGT_LUNIX:
static void OptIncludeDir (const char* Opt attribute ((unused)), const char* Arg)
/* Add an include search path */
-{
+{
AddSearchPath (SysIncSearchPath, Arg);
AddSearchPath (UsrIncSearchPath, Arg);
}
+static void OptListWarnings (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
+/* List all warning types */
+{
+ /* List the warnings */
+ ListWarnings (stdout);
+
+ /* Terminate */
+ exit (EXIT_SUCCESS);
+}
+
+
+
static void OptLocalStrings (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Emit string literals immediately */
{ "--help", 0, OptHelp },
{ "--include-dir", 1, OptIncludeDir },
{ "--list-opt-steps", 0, OptListOptSteps },
+ { "--list-warnings", 0, OptListWarnings },
{ "--local-strings", 0, OptLocalStrings },
{ "--memory-model", 1, OptMemoryModel },
{ "--register-space", 1, OptRegisterSpace },
/* If no CPU given, use the default CPU for the target */
if (CPU == CPU_UNKNOWN) {
if (Target != TGT_UNKNOWN) {
- CPU = DefaultCPU[Target];
+ CPU = GetTargetProperties (Target)->DefaultCPU;
} else {
CPU = CPU_6502;
}