I'd keep the manure out of the compost pile. If you can make the space, age the manure in a separate pile for a full year before adding it to the garden or the compost pile. I've used both cow and horse manures in my garden and I was much happier with the cow manure. With all of those stomachs, cows digest weed seeds better while horses just pass them through. But if the manure is allowed to age for a year, the pile should get nice and hot and kill off the weed seeds. My neighbor has horses and it seems like the flies lose interest in his piles of aging manure when there's fresh manure in the barns to be had.