Tool/software: TI C/C++ Compiler
Hi,
I am building the executable outside Code Composer Studio. I am trying to use the dependency option (preproc_dependency) of compiler to build the executable.
The dependency file generated is of the format as below
file_name.obj: file_name.c
file_name: obj: file_name.h
The dependency file once created will not be regenerated unless the make command is re-triggered. This may cause the dependency file to become outdated and resulting in build failure. For example if the file_name.c is modified and the file_name.h inclusion is removed and deleted from the folder, the dependency file is not regenerated and the obj file creation fails as the file_name.h does not exist.
The solution to this problem is to generate the dependency file in the following format (Auto-dependency) as explained in the link http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ inside
file_name.obj file_name.d: file_name.c
file_name: obj file_name.d: file_name.h
In this approach, along with obj, the dependency files are also dependent on source file and header file. This ensures if there are any updates in source file or header file the dependency file will be recreated and does not solely depend on the rule in makefile. Hence dependency file will never get outdated.
Is there any way to generate the auto-dependency as explained above using the flags from TI CGT?
TI CGT version 18.12.2 LTS
TI CCS version 9.1.0
Thanks,
Aditya