This is a really great question - and is something the music business has always managed to successfully keep very secret, even, amazingly, in the internet age. I hope someone with insider knowledge also answers, if only just to tell me I know nothing.
I think the short answer is that there is no set way in which deals are done and all of the parties involved are responsible for negotiating whatever deal they can manage.
For example, when Michael Jackson re-signed his contract with Epic records (I think, just after the release of Thriller) he, rather famously, negotiated 100% of the income from his sales. In other words, Epic were only covering costs to manufacture and distribute his material; they kept him on the roster purely for the prestige it gave them.
Obviously, if he's getting 100% of the money, then there's no sense in which there's any cut for the the songwriters or producers. I've always taken this to mean that Jackson had already negotiated a private deal with these people, either paying them in cash upfront or some kind of split of his income.
This makes sense of course. After all, if I wanted to make a hit record and I have enough money, I can normally hire the hottest songwriter and producer of the day and get them to let me sing on a record. Of course, they want cash, upfront, for their services - otherwise they are taking a gamble that I will successfully produce them a bigger return by selling millions of copies of the track.
Have you ever noticed that new manufactured acts of all types often have a really good song for their first record? Again, this is assumption on my part but I put this down to record company/management company paying cash-money for the best talent they can muster in order to hit the market hard and generate a lot of interest. Once the teenage girls are switched-on to the act, the actual music is more-or-less irrelevant and they can get it made for a much lower price.
On the other end of the spectrum, you hear stories about boy bands and girl bands where the band members themselves are merely "employees" of a management company that provides everything the act needs to make hit records - right down to the clothes they wear. I've heard a figure of £30 a day as being what the individual band members are paid. Of course, after a certain degree of success, the band members realise that they can dump the management company and get a bigger cut of the profits.
I imagine Prince's deal with his record company must have been very similar to Jackson's. After all, given that, as you say, he literally ran the entire process from writing to label, the distribution company only had to handle one thing: taking the master tapes and turning them into physical product in the shops. Why would Prince concern himself with breaking down exactly how much he was getting paid for each of his hats? So the only deal he had to make was how much the distributing label would charge him for each copy of the product, in terms of manufacture and distribution. Was his prestige high enough to make no money from him, like Jackson, or would they have been able to make something?
tl;dr It varies. A lot.