reworked Makefile, fixed debug flag detection in main.c, corrected map.c calls to fscanf.