fixed Makefile and added ifdef to account for different lapack implementation in mac and linux