-pthread, add JAVA_RUNTIME definition, change the optimization from 02 to -O and from -O to -O0. Add -lXaw -lXt to link for GUI part, and reorder the librarys the correct way.