Adding problem7 solution and fixing Makefiles to apply CFLAGS