altering bin file name

I was wondering if there was a way to modify the .bin file name from within the code. I have a handful of .lib files that are used with different .c files. While the resultant .bin file’s name matches the c file, that is nice, but some of my c files have multiple ways of being compiled and I would like that to be automatically reflected in the name. (renaming in windows is not hard, but prone to operator error).

I assume there is something like the FILE macro that could be redefined, but cannot find documentation on it.

I don’t think there is any way to achieve this programattically from the source code.

The only thing I can suggest is using the command line compiler and a batch file to do the final build when you need to generate the bin files. Then at least you can build and rename the files consistently and hopefully cut out the operator error issues.

Regards,
Peter