add Makefile and test framework