add Makefile, fix loop variable datatype
This MR adds a Makefile for more convenient compilation, including some flags for warnings and optimization.
This MR adds a Makefile for more convenient compilation, including some flags for warnings and optimization.