I am developing rather complex embedded software for TMS320c28346. Managing different variants of this software has become difficult using CCS IDE and I have decided to compile these variants using makefiles. Managing makefiles by hand is laborious and I have had good experiences using CMake as front-end for generating makefiles.
CMake expects that the compiler supports defining object output files in the command line parameters. E.g. using standard GCC compiler, one would define output object file using -o flag:
gcc -c program.c -o release_objs/program_release.obj
I read the "SPRU514C" compiler manual and discovered that cl2000 compiler does not seem to support naming the output object file. Using --obj_directory and --obj_extension it is possible to place object files in specific directory and change its extension. However, output objects filename can not be changed.
Is the a way to specify compiler's output object filename and preferably also the path? I am trying to modify this piece of CMake compile directive:
# compile a C file into an object file
IF(NOT CMAKE_C_COMPILE_OBJECT)
SET(CMAKE_C_COMPILE_OBJECT
"<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
ENDIF(NOT CMAKE_C_COMPILE_OBJECT)
Best regards,
-Henrik