Add os detection to makefile