updated Makefiles, code to compile on OSX Maverics