move code to src/
use cmake instead raw Makefile
eliminate clang `-Wunused-parameter`