IMO, with a custom Makefile, it's hard or impossible to guess how that works, and it's likely you build wrong assumptions into C::B.
What I was expecting that there is some custom command that could be issued on "build file" etc., where I can provide a string that can be composed from parts like basename of the file, extension of the file, folder where the file is located, etc. C::B would then just issue that command.
Or if you allow to attach command to special keys like F7, where you provide file name, extension, etc.