This thread might be interesting to you: How does the Audiounit/VST file actually get created on OSX?
The main takeaway is that you can see all compiler invocations directly in Xcode.
Another place where you can look is FRUT (I’m the author). It enables building JUCE projects using CMake, which then supports many build systems (including Unix Makefiles and Ninja on macOS). You can build one of the JUCE examples using FRUT and look at the Makefile generated by CMake (though it might not be super readable), or you can study the code of Reprojucer.cmake (the central part of FRUT) to understand what are the main settings.
Finally, feel free to ask me any questions about building JUCE, I’ve got a lot of experience now.
