With less than three weeks left in the year, Exelixis (NASDAQ:EXEL) cut it close, but management got the job done.

The company had guided to have at least $200 million in the bank at the end of 2008, so it needed to make at least one more licensing deal for its plethora of unpartnered drugs. No problem; today it picked up $195 million in cash in a deal with Bristol-Myers Squibb (NYSE:BMY).

The deal doesn't come as a big surprise to me. Management tipped its hand a few weeks ago when it agreed to spend some of its cash to co-develop a drug with Bristol-Myers as part of an established partnership.

The new deal with Bristol-Myers involves Exelixis' phase 3 thyroid cancer drug XL184 -- the same drug that GlaxoSmithKline (NYSE:GSK) turned down in October. As I suggested at the time, Glaxo's decision was likely a business one and not based on the likelihood of clinical success, since Bristol-Myers agreed to license the drug and Exelixis has decided to spend some of its cash to co-develop the drug. Exelixis will share profits in the U.S., and potentially get $150 million in milestone payments and double-digit royalties should the drug get approved outside the U.S.

Bristol-Myers also gets phase 1 cancer drug XL281 as part of the deal. The pharma giant will take over development of the drug and Exelixis could get milestone payments of up to $465 million as the drug progresses through the clinic and becomes a commercial success. Exelixis is also entitled to double-digit royalties on worldwide sales of XL281.

This deal puts the Motley Fool Rule Breakers pick in pretty good shape. Between the cash it received this year, the $45 million it'll get next year as part of this deal, and potential milestone payments from partners Glaxo, Wyeth (NYSE:WYE), Genentech (NYSE:DNA), and Daiichi Sankyo, Exelixis is looking good for the next couple of years. Hopefully by then the market will have rebounded and the drugmaker can use the usual method of carrying out secondary offerings to gain any additional cash it might need.

More Foolishness on drugmakers' need for cash: