The Painted Dog can trace its ancestry back some 40 million years to Miacis, a small carnivorous animal with short legs and a long body. The Civet is a direct descendant from this animal.
Around 30 million years ago two other animals Daphaenus, the Bear dog, and Cynodictus emerged.
Descendants of Daphaenus developed into enormous animals around 10 million years ago and eventually evolved as Bears.
Cynodictus had partially retractile claws for an arboreal existence and was Civet like. From this animal, Temnocyon evolved and from this the modern day dogs of Africa, Lycaon, and India, Dhole, and the South American bush dog, Speothos, evolved.
Cynodesmus evolved in North America as huge hyena-like animals, but not related to Hyaenas, of which Borophagus, Hyaenadon and Hyaenognathus are extinct.
An offshoot from Cynodesmus named Tomarctus is the ancestor from which wolves, dogs, foxes and fennecs developed
Behaviour of Wolves, Dogs and Related Canids, Michael W. Fox
The Wild Dogs in Life and Legend, Maxwell Riddle