I am starting a nRF52832 project that is based on the GCC + Makefile build system that is provided with the example projects. In my particular case, I need to execute a python script before the build to create a header file containing version information (that is going to be compiled). I also need to execute another python script at the end of the build to create a special version of the binary.
I am looking at the present Makefile.common and Makefile files and it seems a bit overwhelming with the foreach
, the eval
and the call
functions in the Makefile.
I was just wondering if there was a recommended way to add build steps in the current Makefile system that is provided. Should I add recipe targets in the example directory's Makefile or do I have to do this in the Makefile.common? I noticed that in the Makefile.common there is a prepare_build
function. Should I modify this to make it execute my script too?
Thanks, Alex