We have been using the MTB flow to add driver libraries from vendors and OSS. This uses MTB make getlibs and git to bring the code in, with a version, which is elegant.
However, there is usually a case where you want to have a *.h file to customize the MTB, for example to redefine printf or malloc, or set some constants. But the MTB start.mk file seems to work against us. It prioritizes the mtb-shared version of the *.h file, rather than the project specific copy. We can only make it work by deleting the mtb-shared version of the *.h, which is inelegant since these might be public repos.
How can we force the MTB flow to prioritize our includes, over those in the mtb-shared directories that are next to the *.c files being compiled? I expected that putting our dirs in makefile INCLUDES would do that, but they end up being last, not first.
Solved! Go to Solution.
@RodolfoGL How is this a solution? That will ignore the whole directory, not just one file that you need to override. We need a way to change the search order to just prefer our code over the mtb code if it exists.