I rewrote my makefile a while back to get the benefit of greedily searching for and compiling all sources under some root folder. I'm very happy with it except for the fact that the source libraries I include as submodules tend to have a lot of junk files, e.g. examples, tests, or other sources I don't need... and the make process chokes on these. This is where I am at currently.
So I've come back around to seeing why it can be better to explicitly list sources. The problem with that is that one must always remember to amend the Makefile whenever new sources are added to the tree. That's tedious, and the reason I went initially with the above.
I'm now beginning to wonder if there isn't some method to allow a mix of the two. For example, what if certain folders had a manifest in them that specified certain files to compile, while other folders without a manifest caused the makefile to default to "compile all herein"?
I'm newish to make, so does this sound wise or unwise? Advice on how to set it up? Pitfalls?
P.S. I've considered sparse checkout of submodules to solve the matter without changing my current makefile, but SourceTree does not support this yet, and I rely heavily on it for my use of git.