updated and merged linux and OSX Makefiles