I don't know if this is reassurance, but we got a puppy two weeks ago and our cat legged it too. He was terrified of her (stupid cat, the puppy was smaller!) and wouldn't come in the house at all. He lived in the garden for the best part of a week and we had to leave the cat flap open at night (puppy upstairs) in the hope he would come in for food, which he did.
After a good few days, he started coming in for food in the day occasionally, first checking she was not around. A couple of times she approached him in the garden and he ran off immediately. I was so, so worried we would lose him as I adore our cat.
Next, he started rushing through the house to get upstairs, hissing and spitting at her as he went. He scratched he once too. Poor puppy was very bemused!
Well, now, after two weeks, I wouldn't say they are friends exactly but he is coming in the house a lot more and will now stay in the same room as her, though always in places she can't get to such as on windowsills or high cupboards. So it is improving.
It was a complete shock to me as we already have another dog and old dog and cat are great friends. I think cat will continue to come round but it will take time.
I'd make sure your cat has easy access to food where he doesn't have to run the obviously terrifying gauntlet of the puppy! Even if that is outside - your main aim is to keep him on your property for now so he doesn't defect to somewhere else. Oh, and I'd buy the cat the best, tastiest food you can possibly get, then it's much less likely the asda own brand stuff in the house down the road will be so attractive .
Good luck, and don't panic just yet!