added return NULL if getDeviceFd() does not find a match. updated Makefile compile flags. Linux, Darwin.