added a generator for test cases, and improved makefile