You're looking at 5-10k for a full rebuild man.
But that's taking into account a full refresh...including all the head parts, electrical and mechanical.
I spent 6500 on my E30 M3, just to give you a baseline.
It will end up costing more than the car most likely. That's always fun!