Copter Simulation with Ardupilot and Gazebo from source

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?

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”:

the pre-compiled SITL can be found here:

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.