you need to make sure you install all the headers and development packages. go into synaptic and search for "linux 686", or "linux 386" or whatever your cpu is. and all the gcc stuff too. I'm not sure exactly what. I just installed everything that the search found.
I'm a complete newbie here, trying to make the wireless internet working on Ubuntu 5.10 (i've downloaded the ipw2200-1.0.8 drivers). Using this howto, I run into problems already when trying to compile the ieee80211-1.1.6 package