Loads of pokemon can learn Earthquake from the TM so you can teach it that way.
Also, if the pokemon can learn a move by TM it will also learn it by breeding, so if you teach it to a male pokemon you could breed it onto all compatible pokemon (eg breed a male Graveler with a female Rhydon to get a baby Rhyhorn with Earthquake)