move Makefile from test subdir to root, changed the locations of related files in Makefile and examples