more work on debugging and added compiling flags in the makefile gen