mac os x fixes. added makefile