this ifeq is wrong. must be:
 ifeq ($(OSNAME),darwin)