functional makefile for mac compilation