add Makefile
factor out simple-stream util