Added a new option --dep-target to the compiler. This option allows to set the
target in the generated dependency file. The cl65 utility will use this option to override the depdendency target, if actual object files are to be generated from C input. So the generated dependency will not have the intermediate .s file as target, but the final .o file, which allows to use the dependency files without further processing. git-svn-id: svn://svn.cc65.org/cc65/trunk@4660 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -537,11 +537,32 @@ static void Compile (const char* File)
|
||||
/* Set the target system */
|
||||
CmdSetTarget (&CC65, Target);
|
||||
|
||||
/* If we won't assemble, this is the final step. In this case, set the
|
||||
* output name.
|
||||
*/
|
||||
if (!DoAssemble && OutputName) {
|
||||
CmdSetOutput (&CC65, OutputName);
|
||||
/* Check if this is the final step */
|
||||
if (DoAssemble) {
|
||||
/* We will assemble this file later. If a dependency file is to be
|
||||
* generated, set the dependency target to be the final object file,
|
||||
* not the intermediate assembler file. But beware: There may be an
|
||||
* output name specified for the assembler.
|
||||
*/
|
||||
if (DepName || FullDepName) {
|
||||
/* Was an output name for the assembler specified? */
|
||||
if (!DoLink && OutputName) {
|
||||
/* Use this name as the dependency target */
|
||||
CmdAddArg2 (&CC65, "--dep-target", OutputName);
|
||||
} else {
|
||||
/* Use the object file name as the dependency target */
|
||||
char* ObjName = MakeFilename (File, ".o");
|
||||
CmdAddArg2 (&CC65, "--dep-target", ObjName);
|
||||
xfree (ObjName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* If we won't assemble, this is the final step. In this case, set
|
||||
* the output name if it was given.
|
||||
*/
|
||||
if (OutputName) {
|
||||
CmdSetOutput (&CC65, OutputName);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add the file as argument for the compiler */
|
||||
|
||||
Reference in New Issue
Block a user