remove all MACROS
fix wrong index when outputting
small changes to the makefile for more generic compilation rules