add a main() wrapper and Makefile for tests/