add Makefile, cleanup for -std=c99