fix off by one in parameter parser
expand Makefile for better integration with autotools