If portability is a goal you might want to use CMake and Docker.
replies(2):
Simply load a model or generate a mesh, add some lights, and render.
Yes it only works for Linux. But these days it’s pretty easy to get a Foam with WSL on Windows and Docker for desktop
Sticking with a Makefile is going get increasingly unwieldy for a large project