Added --create-dep and --create-full-dep to the cl65 utility.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4655 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
155
doc/cl65.sgml
155
doc/cl65.sgml
@@ -34,85 +34,86 @@ and other things.
|
|||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Usage: cl65 [options] file [...]
|
Usage: cl65 [options] file [...]
|
||||||
Short options:
|
Short options:
|
||||||
-c Compile and assemble but don't link
|
-c Compile and assemble but don't link
|
||||||
-d Debug mode
|
-d Debug mode
|
||||||
-g Add debug info
|
-g Add debug info
|
||||||
-h Help (this text)
|
-h Help (this text)
|
||||||
-l Create an assembler listing
|
-l Create an assembler listing
|
||||||
-m name Create a map file
|
-m name Create a map file
|
||||||
-mm model Set the memory model
|
-mm model Set the memory model
|
||||||
-o name Name the output file
|
-o name Name the output file
|
||||||
-r Enable register variables
|
-r Enable register variables
|
||||||
-t sys Set the target system
|
-t sys Set the target system
|
||||||
-u sym Force an import of symbol `sym'
|
-u sym Force an import of symbol `sym'
|
||||||
-v Verbose mode
|
-v Verbose mode
|
||||||
-vm Verbose map file
|
-vm Verbose map file
|
||||||
-C name Use linker config file
|
-C name Use linker config file
|
||||||
-Cl Make local variables static
|
-Cl Make local variables static
|
||||||
-D sym[=defn] Define a preprocessor symbol
|
-D sym[=defn] Define a preprocessor symbol
|
||||||
-I dir Set a compiler include directory path
|
-I dir Set a compiler include directory path
|
||||||
-L path Specify a library search path
|
-L path Specify a library search path
|
||||||
-Ln name Create a VICE label file
|
-Ln name Create a VICE label file
|
||||||
-O Optimize code
|
-O Optimize code
|
||||||
-Oi Optimize code, inline functions
|
-Oi Optimize code, inline functions
|
||||||
-Or Optimize code, honour the register keyword
|
-Or Optimize code, honour the register keyword
|
||||||
-Os Optimize code, inline known C funtions
|
-Os Optimize code, inline known C funtions
|
||||||
-S Compile but don't assemble and link
|
-S Compile but don't assemble and link
|
||||||
-T Include source as comment
|
-T Include source as comment
|
||||||
-V Print the version number
|
-V Print the version number
|
||||||
-W Suppress warnings
|
-W Suppress warnings
|
||||||
-Wa options Pass options to the assembler
|
-Wa options Pass options to the assembler
|
||||||
-Wl options Pass options to the linker
|
-Wl options Pass options to the linker
|
||||||
|
|
||||||
Long options:
|
Long options:
|
||||||
--add-source Include source as comment
|
--add-source Include source as comment
|
||||||
--asm-args options Pass options to the assembler
|
--asm-args options Pass options to the assembler
|
||||||
--asm-define sym[=v] Define an assembler symbol
|
--asm-define sym[=v] Define an assembler symbol
|
||||||
--asm-include-dir dir Set an assembler include directory
|
--asm-include-dir dir Set an assembler include directory
|
||||||
--bss-label name Define and export a BSS segment label
|
--bss-label name Define and export a BSS segment label
|
||||||
--bss-name seg Set the name of the BSS segment
|
--bss-name seg Set the name of the BSS segment
|
||||||
--cfg-path path Specify a config file search path
|
--cfg-path path Specify a config file search path
|
||||||
--check-stack Generate stack overflow checks
|
--check-stack Generate stack overflow checks
|
||||||
--code-label name Define and export a CODE segment label
|
--code-label name Define and export a CODE segment label
|
||||||
--code-name seg Set the name of the CODE segment
|
--code-name seg Set the name of the CODE segment
|
||||||
--codesize x Accept larger code by factor x
|
--codesize x Accept larger code by factor x
|
||||||
--config name Use linker config file
|
--config name Use linker config file
|
||||||
--cpu type Set cpu type
|
--cpu type Set cpu type
|
||||||
--create-dep Create a make dependency file
|
--create-dep name Create a make dependency file
|
||||||
--data-label name Define and export a DATA segment label
|
--create-full-dep name Create a full make dependency file
|
||||||
--data-name seg Set the name of the DATA segment
|
--data-label name Define and export a DATA segment label
|
||||||
--debug Debug mode
|
--data-name seg Set the name of the DATA segment
|
||||||
--debug-info Add debug info
|
--debug Debug mode
|
||||||
--feature name Set an emulation feature
|
--debug-info Add debug info
|
||||||
--force-import sym Force an import of symbol `sym'
|
--feature name Set an emulation feature
|
||||||
--forget-inc-paths Forget include search paths (compiler)
|
--force-import sym Force an import of symbol `sym'
|
||||||
--help Help (this text)
|
--forget-inc-paths Forget include search paths (compiler)
|
||||||
--include-dir dir Set a compiler include directory path
|
--help Help (this text)
|
||||||
--ld-args options Pass options to the linker
|
--include-dir dir Set a compiler include directory path
|
||||||
--lib file Link this library
|
--ld-args options Pass options to the linker
|
||||||
--lib-path path Specify a library search path
|
--lib file Link this library
|
||||||
--list-targets List all available targets
|
--lib-path path Specify a library search path
|
||||||
--listing Create an assembler listing
|
--list-targets List all available targets
|
||||||
--list-bytes n Number of bytes per assembler listing line
|
--listing Create an assembler listing
|
||||||
--mapfile name Create a map file
|
--list-bytes n Number of bytes per assembler listing line
|
||||||
--memory-model model Set the memory model
|
--mapfile name Create a map file
|
||||||
--module Link as a module
|
--memory-model model Set the memory model
|
||||||
--module-id id Specify a module id for the linker
|
--module Link as a module
|
||||||
--o65-model model Override the o65 model
|
--module-id id Specify a module id for the linker
|
||||||
--obj file Link this object file
|
--o65-model model Override the o65 model
|
||||||
--obj-path path Specify an object file search path
|
--obj file Link this object file
|
||||||
--register-space b Set space available for register variables
|
--obj-path path Specify an object file search path
|
||||||
--register-vars Enable register variables
|
--register-space b Set space available for register variables
|
||||||
--rodata-name seg Set the name of the RODATA segment
|
--register-vars Enable register variables
|
||||||
--signed-chars Default characters are signed
|
--rodata-name seg Set the name of the RODATA segment
|
||||||
--standard std Language standard (c89, c99, cc65)
|
--signed-chars Default characters are signed
|
||||||
--start-addr addr Set the default start address
|
--standard std Language standard (c89, c99, cc65)
|
||||||
--static-locals Make local variables static
|
--start-addr addr Set the default start address
|
||||||
--target sys Set the target system
|
--static-locals Make local variables static
|
||||||
--version Print the version number
|
--target sys Set the target system
|
||||||
--verbose Verbose mode
|
--version Print the version number
|
||||||
--zeropage-label name Define and export a ZEROPAGE segment label
|
--verbose Verbose mode
|
||||||
--zeropage-name seg Set the name of the ZEROPAGE segment
|
--zeropage-label name Define and export a ZEROPAGE segment label
|
||||||
|
--zeropage-name seg Set the name of the ZEROPAGE segment
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
|
|||||||
285
src/cl65/main.c
285
src/cl65/main.c
@@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1999-2009, Ullrich von Bassewitz */
|
/* (C) 1999-2010, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@@ -112,6 +112,10 @@ static const char* LinkerConfig = 0;
|
|||||||
*/
|
*/
|
||||||
static const char* FirstInput = 0;
|
static const char* FirstInput = 0;
|
||||||
|
|
||||||
|
/* The names of the files for dependency generation */
|
||||||
|
static const char* DepName = 0;
|
||||||
|
static const char* FullDepName = 0;
|
||||||
|
|
||||||
/* Remember if we should link a module */
|
/* Remember if we should link a module */
|
||||||
static int Module = 0;
|
static int Module = 0;
|
||||||
|
|
||||||
@@ -435,12 +439,12 @@ static void Link (void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void Assemble (const char* File)
|
static void AssembleFile (const char* File, unsigned ArgCount)
|
||||||
/* Assemble the given file */
|
/* Common routine to assemble a file. Will be called by Assemble() and
|
||||||
|
* AssembleIntermediate(). Adds options common for both routines and
|
||||||
|
* assembles the file. Will remove excess arguments after assembly.
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
/* Remember the current assembler argument count */
|
|
||||||
unsigned ArgCount = CA65.ArgCount;
|
|
||||||
|
|
||||||
/* Set the target system */
|
/* Set the target system */
|
||||||
CmdSetTarget (&CA65, Target);
|
CmdSetTarget (&CA65, Target);
|
||||||
|
|
||||||
@@ -448,15 +452,15 @@ static void Assemble (const char* File)
|
|||||||
* output name.
|
* output name.
|
||||||
*/
|
*/
|
||||||
if (DontLink && OutputName) {
|
if (DontLink && OutputName) {
|
||||||
CmdSetOutput (&CA65, OutputName);
|
CmdSetOutput (&CA65, OutputName);
|
||||||
} else {
|
} else {
|
||||||
/* The object file name will be the name of the source file
|
/* The object file name will be the name of the source file
|
||||||
* with .s replaced by ".o". Add this file to the list of
|
* with .s replaced by ".o". Add this file to the list of
|
||||||
* linker files.
|
* linker files.
|
||||||
*/
|
*/
|
||||||
char* ObjName = MakeFilename (File, ".o");
|
char* ObjName = MakeFilename (File, ".o");
|
||||||
CmdAddFile (&LD65, ObjName);
|
CmdAddFile (&LD65, ObjName);
|
||||||
xfree (ObjName);
|
xfree (ObjName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the file as argument for the assembler */
|
/* Add the file as argument for the assembler */
|
||||||
@@ -474,6 +478,46 @@ static void Assemble (const char* File)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void AssembleIntermediate (const char* File)
|
||||||
|
/* Assemble an intermediate file. The -dep options won't be added and
|
||||||
|
* the file is removed after assembly.
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
/* Use common routine */
|
||||||
|
AssembleFile (File, CA65.ArgCount);
|
||||||
|
|
||||||
|
/* Remove the generated file */
|
||||||
|
if (remove (File) < 0) {
|
||||||
|
Warning ("Cannot remove temporary file `%s': %s",
|
||||||
|
File, strerror (errno));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void Assemble (const char* File)
|
||||||
|
/* Assemble the given file */
|
||||||
|
{
|
||||||
|
/* Remember the current assembler argument count */
|
||||||
|
unsigned ArgCount = CA65.ArgCount;
|
||||||
|
|
||||||
|
/* We aren't assembling an intermediate file, but one requested by the
|
||||||
|
* user. So add a few options here if they were given on the command
|
||||||
|
* line.
|
||||||
|
*/
|
||||||
|
if (DepName && *DepName) {
|
||||||
|
CmdAddArg2 (&CA65, "--create-dep", DepName);
|
||||||
|
}
|
||||||
|
if (FullDepName && *FullDepName) {
|
||||||
|
CmdAddArg2 (&CA65, "--create-full-dep", FullDepName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Use the common routine */
|
||||||
|
AssembleFile (File, ArgCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void Compile (const char* File)
|
static void Compile (const char* File)
|
||||||
/* Compile the given file */
|
/* Compile the given file */
|
||||||
{
|
{
|
||||||
@@ -485,16 +529,16 @@ static void Compile (const char* File)
|
|||||||
/* Set the target system */
|
/* Set the target system */
|
||||||
CmdSetTarget (&CC65, Target);
|
CmdSetTarget (&CC65, Target);
|
||||||
|
|
||||||
/* If we won't link, this is the final step. In this case, set the
|
/* If we won't assemble, this is the final step. In this case, set the
|
||||||
* output name.
|
* output name.
|
||||||
*/
|
*/
|
||||||
if (DontAssemble && OutputName) {
|
if (DontAssemble && OutputName) {
|
||||||
CmdSetOutput (&CC65, OutputName);
|
CmdSetOutput (&CC65, OutputName);
|
||||||
} else {
|
} else {
|
||||||
/* The assembler file name will be the name of the source file
|
/* The assembler file name will be the name of the source file
|
||||||
* with .c replaced by ".s".
|
* with .c replaced by ".s".
|
||||||
*/
|
*/
|
||||||
AsmName = MakeFilename (File, ".s");
|
AsmName = MakeFilename (File, ".s");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the file as argument for the compiler */
|
/* Add the file as argument for the compiler */
|
||||||
@@ -513,13 +557,11 @@ static void Compile (const char* File)
|
|||||||
* remove it
|
* remove it
|
||||||
*/
|
*/
|
||||||
if (!DontAssemble) {
|
if (!DontAssemble) {
|
||||||
Assemble (AsmName);
|
AssembleIntermediate (AsmName);
|
||||||
if (remove (AsmName) < 0) {
|
|
||||||
Warning ("Cannot remove temporary file `%s': %s",
|
|
||||||
AsmName, strerror (errno));
|
|
||||||
}
|
|
||||||
xfree (AsmName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Free the assembler file name which was allocated from the heap */
|
||||||
|
xfree (AsmName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -553,11 +595,7 @@ static void CompileRes (const char* File)
|
|||||||
* remove it
|
* remove it
|
||||||
*/
|
*/
|
||||||
if (!DontAssemble) {
|
if (!DontAssemble) {
|
||||||
Assemble (AsmName);
|
AssembleIntermediate (AsmName);
|
||||||
if (remove (AsmName) < 0) {
|
|
||||||
Warning ("Cannot remove temporary file `%s': %s",
|
|
||||||
AsmName, strerror (errno));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the assembler file name which was allocated from the heap */
|
/* Free the assembler file name which was allocated from the heap */
|
||||||
@@ -574,7 +612,7 @@ static void ConvertO65 (const char* File)
|
|||||||
/* Remember the current converter argument count */
|
/* Remember the current converter argument count */
|
||||||
unsigned ArgCount = CO65.ArgCount;
|
unsigned ArgCount = CO65.ArgCount;
|
||||||
|
|
||||||
/* If we won't link, this is the final step. In this case, set the
|
/* If we won't assemble, this is the final step. In this case, set the
|
||||||
* output name.
|
* output name.
|
||||||
*/
|
*/
|
||||||
if (DontAssemble && OutputName) {
|
if (DontAssemble && OutputName) {
|
||||||
@@ -602,11 +640,7 @@ static void ConvertO65 (const char* File)
|
|||||||
* remove it
|
* remove it
|
||||||
*/
|
*/
|
||||||
if (!DontAssemble) {
|
if (!DontAssemble) {
|
||||||
Assemble (AsmName);
|
AssembleIntermediate (AsmName);
|
||||||
if (remove (AsmName) < 0) {
|
|
||||||
Warning ("Cannot remove temporary file `%s': %s",
|
|
||||||
AsmName, strerror (errno));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the assembler file name which was allocated from the heap */
|
/* Free the assembler file name which was allocated from the heap */
|
||||||
@@ -626,85 +660,86 @@ static void Usage (void)
|
|||||||
{
|
{
|
||||||
printf ("Usage: %s [options] file [...]\n"
|
printf ("Usage: %s [options] file [...]\n"
|
||||||
"Short options:\n"
|
"Short options:\n"
|
||||||
" -c\t\t\tCompile and assemble but don't link\n"
|
" -c\t\t\t\tCompile and assemble but don't link\n"
|
||||||
" -d\t\t\tDebug mode\n"
|
" -d\t\t\t\tDebug mode\n"
|
||||||
" -g\t\t\tAdd debug info\n"
|
" -g\t\t\t\tAdd debug info\n"
|
||||||
" -h\t\t\tHelp (this text)\n"
|
" -h\t\t\t\tHelp (this text)\n"
|
||||||
" -l\t\t\tCreate an assembler listing\n"
|
" -l\t\t\t\tCreate an assembler listing\n"
|
||||||
" -m name\t\tCreate a map file\n"
|
" -m name\t\t\tCreate a map file\n"
|
||||||
" -mm model\t\tSet the memory model\n"
|
" -mm model\t\t\tSet the memory model\n"
|
||||||
" -o name\t\tName the output file\n"
|
" -o name\t\t\tName the output file\n"
|
||||||
" -r\t\t\tEnable register variables\n"
|
" -r\t\t\t\tEnable register variables\n"
|
||||||
" -t sys\t\tSet the target system\n"
|
" -t sys\t\t\tSet the target system\n"
|
||||||
" -u sym\t\tForce an import of symbol `sym'\n"
|
" -u sym\t\t\tForce an import of symbol `sym'\n"
|
||||||
" -v\t\t\tVerbose mode\n"
|
" -v\t\t\t\tVerbose mode\n"
|
||||||
" -vm\t\t\tVerbose map file\n"
|
" -vm\t\t\t\tVerbose map file\n"
|
||||||
" -C name\t\tUse linker config file\n"
|
" -C name\t\t\tUse linker config file\n"
|
||||||
" -Cl\t\t\tMake local variables static\n"
|
" -Cl\t\t\t\tMake local variables static\n"
|
||||||
" -D sym[=defn]\t\tDefine a preprocessor symbol\n"
|
" -D sym[=defn]\t\t\tDefine a preprocessor symbol\n"
|
||||||
" -I dir\t\tSet a compiler include directory path\n"
|
" -I dir\t\t\tSet a compiler include directory path\n"
|
||||||
" -L path\t\tSpecify a library search path\n"
|
" -L path\t\t\tSpecify a library search path\n"
|
||||||
" -Ln name\t\tCreate a VICE label file\n"
|
" -Ln name\t\t\tCreate a VICE label file\n"
|
||||||
" -O\t\t\tOptimize code\n"
|
" -O\t\t\t\tOptimize code\n"
|
||||||
" -Oi\t\t\tOptimize code, inline functions\n"
|
" -Oi\t\t\t\tOptimize code, inline functions\n"
|
||||||
" -Or\t\t\tOptimize code, honour the register keyword\n"
|
" -Or\t\t\t\tOptimize code, honour the register keyword\n"
|
||||||
" -Os\t\t\tOptimize code, inline known C funtions\n"
|
" -Os\t\t\t\tOptimize code, inline known C funtions\n"
|
||||||
" -S\t\t\tCompile but don't assemble and link\n"
|
" -S\t\t\t\tCompile but don't assemble and link\n"
|
||||||
" -T\t\t\tInclude source as comment\n"
|
" -T\t\t\t\tInclude source as comment\n"
|
||||||
" -V\t\t\tPrint the version number\n"
|
" -V\t\t\t\tPrint the version number\n"
|
||||||
" -W\t\t\tSuppress warnings\n"
|
" -W\t\t\t\tSuppress warnings\n"
|
||||||
" -Wa options\t\tPass options to the assembler\n"
|
" -Wa options\t\t\tPass options to the assembler\n"
|
||||||
" -Wl options\t\tPass options to the linker\n"
|
" -Wl options\t\t\tPass options to the linker\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Long options:\n"
|
"Long options:\n"
|
||||||
" --add-source\t\tInclude source as comment\n"
|
" --add-source\t\t\tInclude source as comment\n"
|
||||||
" --asm-args options\tPass options to the assembler\n"
|
" --asm-args options\t\tPass options to the assembler\n"
|
||||||
" --asm-define sym[=v]\tDefine an assembler symbol\n"
|
" --asm-define sym[=v]\t\tDefine an assembler symbol\n"
|
||||||
" --asm-include-dir dir\tSet an assembler include directory\n"
|
" --asm-include-dir dir\t\tSet an assembler include directory\n"
|
||||||
" --bss-label name\tDefine and export a BSS segment label\n"
|
" --bss-label name\t\tDefine and export a BSS segment label\n"
|
||||||
" --bss-name seg\tSet the name of the BSS segment\n"
|
" --bss-name seg\t\tSet the name of the BSS segment\n"
|
||||||
" --cfg-path path\tSpecify a config file search path\n"
|
" --cfg-path path\t\tSpecify a config file search path\n"
|
||||||
" --check-stack\t\tGenerate stack overflow checks\n"
|
" --check-stack\t\t\tGenerate stack overflow checks\n"
|
||||||
" --code-label name\tDefine and export a CODE segment label\n"
|
" --code-label name\t\tDefine and export a CODE segment label\n"
|
||||||
" --code-name seg\tSet the name of the CODE segment\n"
|
" --code-name seg\t\tSet the name of the CODE segment\n"
|
||||||
" --codesize x\t\tAccept larger code by factor x\n"
|
" --codesize x\t\t\tAccept larger code by factor x\n"
|
||||||
" --config name\t\tUse linker config file\n"
|
" --config name\t\t\tUse linker config file\n"
|
||||||
" --cpu type\t\tSet cpu type\n"
|
" --cpu type\t\t\tSet cpu type\n"
|
||||||
" --create-dep\t\tCreate a make dependency file\n"
|
" --create-dep name\t\tCreate a make dependency file\n"
|
||||||
" --data-label name\tDefine and export a DATA segment label\n"
|
" --create-full-dep name\tCreate a full make dependency file\n"
|
||||||
" --data-name seg\tSet the name of the DATA segment\n"
|
" --data-label name\t\tDefine and export a DATA segment label\n"
|
||||||
" --debug\t\tDebug mode\n"
|
" --data-name seg\t\tSet the name of the DATA segment\n"
|
||||||
" --debug-info\t\tAdd debug info\n"
|
" --debug\t\t\tDebug mode\n"
|
||||||
" --feature name\tSet an emulation feature\n"
|
" --debug-info\t\t\tAdd debug info\n"
|
||||||
" --force-import sym\tForce an import of symbol `sym'\n"
|
" --feature name\t\tSet an emulation feature\n"
|
||||||
" --forget-inc-paths\tForget include search paths (compiler)\n"
|
" --force-import sym\t\tForce an import of symbol `sym'\n"
|
||||||
" --help\t\tHelp (this text)\n"
|
" --forget-inc-paths\t\tForget include search paths (compiler)\n"
|
||||||
" --include-dir dir\tSet a compiler include directory path\n"
|
" --help\t\t\tHelp (this text)\n"
|
||||||
" --ld-args options\tPass options to the linker\n"
|
" --include-dir dir\t\tSet a compiler include directory path\n"
|
||||||
" --lib file\t\tLink this library\n"
|
" --ld-args options\t\tPass options to the linker\n"
|
||||||
" --lib-path path\tSpecify a library search path\n"
|
" --lib file\t\t\tLink this library\n"
|
||||||
" --list-targets\tList all available targets\n"
|
" --lib-path path\t\tSpecify a library search path\n"
|
||||||
" --listing\t\tCreate an assembler listing\n"
|
" --list-targets\t\tList all available targets\n"
|
||||||
" --list-bytes n\tNumber of bytes per assembler listing line\n"
|
" --listing\t\t\tCreate an assembler listing\n"
|
||||||
" --mapfile name\tCreate a map file\n"
|
" --list-bytes n\t\tNumber of bytes per assembler listing line\n"
|
||||||
" --memory-model model\tSet the memory model\n"
|
" --mapfile name\t\tCreate a map file\n"
|
||||||
" --module\t\tLink as a module\n"
|
" --memory-model model\t\tSet the memory model\n"
|
||||||
" --module-id id\tSpecify a module id for the linker\n"
|
" --module\t\t\tLink as a module\n"
|
||||||
" --o65-model model\tOverride the o65 model\n"
|
" --module-id id\t\tSpecify a module id for the linker\n"
|
||||||
" --obj file\t\tLink this object file\n"
|
" --o65-model model\t\tOverride the o65 model\n"
|
||||||
" --obj-path path\tSpecify an object file search path\n"
|
" --obj file\t\t\tLink this object file\n"
|
||||||
" --register-space b\tSet space available for register variables\n"
|
" --obj-path path\t\tSpecify an object file search path\n"
|
||||||
" --register-vars\tEnable register variables\n"
|
" --register-space b\t\tSet space available for register variables\n"
|
||||||
" --rodata-name seg\tSet the name of the RODATA segment\n"
|
" --register-vars\t\tEnable register variables\n"
|
||||||
" --signed-chars\tDefault characters are signed\n"
|
" --rodata-name seg\t\tSet the name of the RODATA segment\n"
|
||||||
" --standard std\tLanguage standard (c89, c99, cc65)\n"
|
" --signed-chars\t\tDefault characters are signed\n"
|
||||||
" --start-addr addr\tSet the default start address\n"
|
" --standard std\t\tLanguage standard (c89, c99, cc65)\n"
|
||||||
" --static-locals\tMake local variables static\n"
|
" --start-addr addr\t\tSet the default start address\n"
|
||||||
" --target sys\t\tSet the target system\n"
|
" --static-locals\t\tMake local variables static\n"
|
||||||
" --version\t\tPrint the version number\n"
|
" --target sys\t\t\tSet the target system\n"
|
||||||
" --verbose\t\tVerbose mode\n"
|
" --version\t\t\tPrint the version number\n"
|
||||||
" --zeropage-label name\tDefine and export a ZEROPAGE segment label\n"
|
" --verbose\t\t\tVerbose mode\n"
|
||||||
" --zeropage-name seg\tSet the name of the ZEROPAGE segment\n",
|
" --zeropage-label name\t\tDefine and export a ZEROPAGE segment label\n"
|
||||||
|
" --zeropage-name seg\t\tSet the name of the ZEROPAGE segment\n",
|
||||||
ProgName);
|
ProgName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -823,11 +858,26 @@ static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptCreateDep (const char* Opt attribute ((unused)),
|
static void OptCreateDep (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
const char* Arg attribute ((unused)))
|
|
||||||
/* Handle the --create-dep option */
|
/* Handle the --create-dep option */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "--create-dep");
|
/* Add the file name to the compiler */
|
||||||
|
CmdAddArg2 (&CC65, "--create-dep", Arg);
|
||||||
|
|
||||||
|
/* Remember the file name for the assembler */
|
||||||
|
DepName = Arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptCreateFullDep (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
|
/* Handle the --create-full-dep option */
|
||||||
|
{
|
||||||
|
/* Add the file name to the compiler */
|
||||||
|
CmdAddArg2 (&CC65, "--create-full-dep", Arg);
|
||||||
|
|
||||||
|
/* Remember the file name for the assembler */
|
||||||
|
FullDepName = Arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1168,7 +1218,8 @@ int main (int argc, char* argv [])
|
|||||||
{ "--codesize", 1, OptCodeSize },
|
{ "--codesize", 1, OptCodeSize },
|
||||||
{ "--config", 1, OptConfig },
|
{ "--config", 1, OptConfig },
|
||||||
{ "--cpu", 1, OptCPU },
|
{ "--cpu", 1, OptCPU },
|
||||||
{ "--create-dep", 0, OptCreateDep },
|
{ "--create-dep", 1, OptCreateDep },
|
||||||
|
{ "--create-full-dep", 1, OptCreateFullDep },
|
||||||
{ "--data-label", 1, OptDataLabel },
|
{ "--data-label", 1, OptDataLabel },
|
||||||
{ "--data-name", 1, OptDataName },
|
{ "--data-name", 1, OptDataName },
|
||||||
{ "--debug", 0, OptDebug },
|
{ "--debug", 0, OptDebug },
|
||||||
|
|||||||
Reference in New Issue
Block a user