update makefile to add OS detection