Copter Simulation with Ardupilot and Gazebo from source

Hi.
I want to compile the ArduCopter from Ardupilot source with removing from all other extra codes (such as ArduPlane, hardware librarires, etc) to only leave the codes used to simulate a copter in the simulation (Gazebo environment). For final, i should be able to start my Ardupilot firmware from only compiled cpp files and now i have only the necessary codes.
Is there an easy way to do this? Where should i begin?
Thanks…

No need to remove anything at all. ArduCopter SITL does not contain any Plane, Rover or Sub code. There is nothing in there that you need to remove or simplify.

Just compile or download a “AdruCopter SITL” and run that together with Gazebo.

Documentation can (as always) be found with google “ArduCopter SITL gazebo”: http://www.lmgtfy.com/?q=ArduCopter+SITL+gazebo

http://ardupilot.org/dev/docs/using-gazebo-simulator-with-sitl.html

the pre-compiled SITL can be found here: http://firmware.ardupilot.org/Copter/2019-03/2019-03-31-10:03/SITL_x86_64_linux_gnu/

As you can read from @amilcarlucas reply, when you compile SITL you also define which vehicle you’re building for, so that you won’t get mixed vehicles on a single binary.

The documentation also descries how to compile from source.