List of libraries compiled for each hardware platform

Hello,
I am trying to embed Ardupilot into a Pixhawk 4 board connected to a PC running Gazebo, simulating input variables in its workspace and sending them to the robot’s sensors. However, the support for Gazebo does not seem to be avaliable in the Pixhawk4 version of the Ardupilot build (it works when running it from a PC).
My solution to that would be to find the list of libraries that are compiled after the target platform is selected in the build script, and manually include the ones related to Gazebo in the board’s build process. The problem is that I can’t find the file in which those libraries are defined. Does anyone know which file is that and how to alter it?