Add top-level Makefile.
Use -pthreads instead of -lpthreads in Makefile