Fix compilation error with OPTFLOW enabled.
Add top-level Makefile that support build, clean, upload, open cli and index sources.