added makefile, fixed gcc warnings