New option --list-targets
git-svn-id: svn://svn.cc65.org/cc65/trunk@2945 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1999-2003 Ullrich von Bassewitz */
|
/* (C) 1999-2004 Ullrich von Bassewitz */
|
||||||
/* R<>merstrasse 52 */
|
/* R<>merstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@@ -644,6 +644,7 @@ static void Usage (void)
|
|||||||
" --include-dir dir\tSet a compiler include directory path\n"
|
" --include-dir dir\tSet a compiler include directory path\n"
|
||||||
" --lib file\t\tLink this library\n"
|
" --lib file\t\tLink this library\n"
|
||||||
" --lib-path path\tSpecify a library search path\n"
|
" --lib-path path\tSpecify a library search path\n"
|
||||||
|
" --list-targets\tList all available targets\n"
|
||||||
" --listing\t\tCreate an assembler listing\n"
|
" --listing\t\tCreate an assembler listing\n"
|
||||||
" --mapfile name\tCreate a map file\n"
|
" --mapfile name\tCreate a map file\n"
|
||||||
" --memory-model model\tSet the memory model\n"
|
" --memory-model model\tSet the memory model\n"
|
||||||
@@ -889,6 +890,23 @@ static void OptListing (const char* Opt attribute ((unused)),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptListTargets (const char* Opt attribute ((unused)),
|
||||||
|
const char* Arg attribute ((unused)))
|
||||||
|
/* List all targets */
|
||||||
|
{
|
||||||
|
unsigned I;
|
||||||
|
|
||||||
|
/* List the targets */
|
||||||
|
for (I = TGT_NONE; I < TGT_COUNT; ++I) {
|
||||||
|
printf ("%s\n", TargetNames[I]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Terminate */
|
||||||
|
exit (EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptMapFile (const char* Opt attribute ((unused)), const char* Arg)
|
static void OptMapFile (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
/* Create a map file */
|
/* Create a map file */
|
||||||
{
|
{
|
||||||
@@ -1088,6 +1106,7 @@ int main (int argc, char* argv [])
|
|||||||
{ "--include-dir", 1, OptIncludeDir },
|
{ "--include-dir", 1, OptIncludeDir },
|
||||||
{ "--lib", 1, OptLib },
|
{ "--lib", 1, OptLib },
|
||||||
{ "--lib-path", 1, OptLibPath },
|
{ "--lib-path", 1, OptLibPath },
|
||||||
|
{ "--list-targets", 0, OptListTargets },
|
||||||
{ "--listing", 0, OptListing },
|
{ "--listing", 0, OptListing },
|
||||||
{ "--mapfile", 1, OptMapFile },
|
{ "--mapfile", 1, OptMapFile },
|
||||||
{ "--memory-model", 1, OptMemoryModel },
|
{ "--memory-model", 1, OptMemoryModel },
|
||||||
|
|||||||
Reference in New Issue
Block a user