Where can I find a table showing the relation between Hanyu pinyin spelling and IPA for all phonemes in Mandarin?
Here is a list for all the pinyin and there correspondence IPA: http://ling.cass.cn/yuyin/english/sampac/sampac.htm
You'll need a special font to show the IPA on the page correctly, which is downloadable from the page.
This page is in the web site of the Institute of Linguistics, the Chinese Academy of Social Sciences.
NOTE: same letter in different pinyin won't correspond to the same IPA, the pronunciation may be different. An simple example is that the 'i' in 'li' 'si' 'shi' are all different.
NOTE2: the pronunciation does change (a lot) in spontaneous speech. If you take that into account, it will be very complicated, with maybe no ready answer. The list only give the correspondence when they are pronounced alone.
Personally I think the IPA given in the Wikipedia page for Pinyin is organized well and the symbols don't change like other pages I've seen, i.e. the browser changes to other symbols ruining the IPA scheme.
Like it has been said, the IPA transcription might change in some words endings when you transcribe real speech, so you must be aware of that and know what the different symbols mean.
I have created a list for fully mapping Pinyin to IPA. Sources should be given there: http://code.google.com/p/cjklib/source/browse/trunk/cjklib/data/pinyinipamapping.csv
There are many tools can do it. http://py2ipa.sourceforge.net/