I need to exclude certain files from the build and I would like to make it conditional on a #define variable.
Basically, I am building same code for two different platforms – one has smaller flash footprint and some features have to be compiled out. Changes are scattered across multiple projects, so modifying each one for a build is not practical.
Is there a way to automate that in M2M?
One option is to put #ifdef xxxx in each file to be taken out. Unfortunately, for one of the project this is not practical as it contains hundreds of files.
Another option that will be helpful is ability to create multiple targets from a project. For example, I have 2 files in a project that is built as a library. Would be very nice to have the build result as 2 separate libraries + library that combines the two. Then, at link stage, I can select what to link. It is still manual process, but it will be easier to manage.
Any help is appreciated.