Several years ago, the old LibreOffice build system is migrated to the new gbuild system. But, there are still few instances of the old build system remaining. If you look for makefile.mk inside the LibreOffice core source, you will find them:
find -name makefile.mk
Each of the remaining sub-projects that still use the old build system are a kind of test, demo or workbench. The task here is to use the new build system for each one of the remaining stuff.
You should determine what to do with the old stuff:
1) If it is a test, the best option would be to convert it to an automated test, preferably using cppunit.
2) If it is a demo, or a workben(ch) that have a main() inside it, you can rewrite the makefile to use the new build system. You should take a look at the examples like vcldemo, mtfdemo, etc. There is a little chance that the result works out of the box, and you may have to overhaul the cpp files in order to be able to build and run it successfully. The result is expected to be run like mtfdemo and similar examples.
Set to NEW as this is an easyhack.
It's normally much easier to just convert a demo or workbench program to gbuild. In fact, most old tests are no easy hacks, IMHO. You must convert a test, understand them and eventually evaluate the result. Some might require additional setup in gbuild.
So I suggest to stick with workbench and demo programs. The gbuild conversion is most times straight-forward and then you normally must just fix compiler warnings.
One of the later conversions can be seen in commit a4749a48677b26c8b9ba9cf36f5c9bf62ed9ed8a ("Convert canvasdemo to gbuild").