如何使用源代码外构建将golang合并到Makefile中

I have a large codebase with sources written in multiple languages. The build system uses GNU make. I want to incorporate golang sources that use the new module structure, but I want build avoidance such that the target executable should not be rebuilt if the sources have not changed, and I want out-of-source building.

Using go 1.12, I can get the out-of-source building by creating a new build directory and symlinking back to the source directory, but this is ugly. And I can't find a way to avoid rebuilding if sources haven't changed since I simply cannot tell what the full list of sources is (other local modules may or may not be pulled in to the build)