here is the makefile i wrote, works on linux and windows , detects the operating ssytem an changes some things
read , edit, make backup, rename to Makefile
i bet it can be tweaked in a better way, but i wanted to keep it easy
also good to read and browse
http://gcc.gnu.org/onlinedocs/gcc-3....4-Options.html
http://gcc.gnu.org/onlinedocs/
http://reviewed.homelinux.org/howtos/compiling/
i hope that helps at least compiling versions for linux users