Fixed Bug in makefiles.  Implemented math functions that were missing.