Neither, we use UnrealBuildTool, which is a custom tool that determines what modules and plugins are needed and drives the compilation and linking. In recent versions we do generate a ‘makefile’ to help speed up UBT execution time, only invalidating it when configurations or projects change, or you generate project files again. It’s not a makefile in the traditional sense (something that make can consume), but it might be transformable to something that YCM could consume. Check out Makefile.ubt and the code surrounding it in UnrealBuildTool.cs (e.g., LoadUBTMakefile).
Cheers,
Michael Noland