updated makefiles for Mac OS X and Linux