While I'm sure there is a crazy markup, it's important to note the cost to produce - as in manufacture - does not include the cost of drug discovery, which is extremely expensive and involves a good amount of risk over a long period of time.
You can't just compare the cost of discovering a new drug vs. cost of producing a generic without any research like that.